-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
24 changed files
with
1,995 additions
and
362 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,16 @@ | ||
name-template: v$NEXT_PATCH_VERSION | ||
tag-template: v$NEXT_PATCH_VERSION | ||
categories: | ||
- title: 🚀 Improvements | ||
- title: 🔨 Improvements | ||
label: enhancement | ||
- title: 🐛 Bug Fixes | ||
label: bug | ||
- title: 🚀 New Features | ||
label: Feature | ||
change-template: '- #$NUMBER: $TITLE by @$AUTHOR' | ||
template: | | ||
# Changes | ||
$CHANGES | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
name: Build & Release draft | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
deploy: | ||
name: build dependencies & create artifact | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
- name: Install composer dependencies | ||
run: composer install --no-dev -o | ||
- name: Clean-up project | ||
uses: PrestaShopCorp/[email protected] | ||
- name: Create & upload artifact | ||
uses: actions/upload-artifact@v1 | ||
with: | ||
name: ${{ github.event.repository.name }} | ||
path: ../ | ||
update_release_draft: | ||
runs-on: ubuntu-latest | ||
needs: [deploy] | ||
if: github.event_name == 'push' | ||
steps: | ||
- name: Download artifact | ||
uses: actions/download-artifact@v1 | ||
with: | ||
name: ${{ github.event.repository.name }} | ||
- id: release_info | ||
uses: toolmantim/release-drafter@v5 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Prepare for Release | ||
run: | | ||
cd ${{ github.event.repository.name }} | ||
zip -r ${{ github.event.repository.name }}.zip ${{ github.event.repository.name }} | ||
- name: Clean existing assets | ||
shell: bash | ||
run: | | ||
curl -fsSL https://github.com/github/hub/raw/master/script/get | bash -s 2.14.1 | ||
assets=`bin/hub api -t repos/${{ github.repository }}/releases/${{ steps.release_info.outputs.id }}/assets | awk '/\].url/ { print $2 }'` | ||
for asset in $assets | ||
do | ||
bin/hub api -X DELETE $asset | ||
done | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Publish to GitHub Release | ||
uses: actions/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.release_info.outputs.upload_url }} | ||
asset_path: ./${{ github.event.repository.name }}/${{ github.event.repository.name }}.zip | ||
asset_name: ${{ github.event.repository.name }}.zip | ||
asset_content_type: application/zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: PHP tests | ||
on: [push, pull_request] | ||
jobs: | ||
php-linter: | ||
name: PHP Syntax check 5.6|7.2|7.3 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
- name: PHP syntax checker 5.6 | ||
uses: prestashop/github-action-php-lint/5.6@master | ||
- name: PHP syntax checker 7.2 | ||
uses: prestashop/github-action-php-lint/7.2@master | ||
- name: PHP syntax checker 7.3 | ||
uses: prestashop/github-action-php-lint/7.3@master | ||
php-cs-fixer: | ||
name: PHP-CS-Fixer | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
- name: Run PHP-CS-Fixer | ||
uses: prestashopcorp/github-action-php-cs-fixer@master | ||
phpstan: | ||
name: PHPStan | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
presta-versions: ['1.7.0.3', 'latest'] | ||
steps: | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
|
||
- name: Cache vendor folder | ||
uses: actions/cache@v1 | ||
with: | ||
path: vendor | ||
key: php-${{ hashFiles('composer.lock') }} | ||
|
||
- name: Cache composer folder | ||
uses: actions/cache@v1 | ||
with: | ||
path: ~/.composer/cache | ||
key: php-composer-cache | ||
|
||
- run: composer install | ||
|
||
- name: Pull PrestaShop files (Tag ${{ matrix.presta-versions }}) | ||
run: docker run -tid --rm -v ps-volume:/var/www/html --name temp-ps prestashop/prestashop:${{ matrix.presta-versions }} | ||
|
||
- name : Run PHPStan | ||
run: docker run --rm --volumes-from temp-ps -v $PWD:/web/module -e _PS_ROOT_DIR_=/var/www/html --workdir=/web/module phpstan/phpstan:0.12 analyse --configuration=/web/module/tests/phpstan/phpstan.neon |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?php | ||
|
||
$config = new PrestaShop\CodingStandards\CsFixer\Config(); | ||
|
||
$config | ||
->setUsingCache(true) | ||
->getFinder() | ||
->in(__DIR__) | ||
->exclude('vendor'); | ||
|
||
return $config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,41 @@ | ||
{ | ||
"name": "matt75/displayordercarrier", | ||
"description": "PrestaShop module displayordercarrier", | ||
"homepage": "https://github.com/Matt75/displayordercarrier", | ||
"license": "AFL-3.0", | ||
"authors": [ | ||
{ | ||
"name": "Matt75", | ||
"email": "[email protected]" | ||
} | ||
], | ||
"require": { | ||
"php": ">=5.6" | ||
}, | ||
"config": { | ||
"platform": { | ||
"php": "5.6.0" | ||
"type": "prestashop-module", | ||
"name": "matt75/displayordercarrier", | ||
"description": "PrestaShop module displayordercarrier", | ||
"homepage": "https://github.com/Matt75/displayordercarrier", | ||
"license": "AFL-3.0", | ||
"authors": [ | ||
{ | ||
"name": "Matt75", | ||
"email": "[email protected]" | ||
} | ||
], | ||
"config": { | ||
"platform": { | ||
"php": "5.6.0" | ||
}, | ||
"preferred-install": "dist", | ||
"classmap-authoritative": true, | ||
"optimize-autoloader": true, | ||
"sort-packages": true, | ||
"prepend-autoloader": false | ||
}, | ||
"preferred-install": "dist", | ||
"prepend-autoloader": false | ||
}, | ||
"type": "prestashop-module" | ||
} | ||
"autoload": { | ||
"psr-4": { | ||
"PrestaShop\\Module\\DisplayOrderCarrier\\": "src/" | ||
}, | ||
"classmap": [ | ||
"controllers", | ||
"displayordercarrier.php" | ||
] | ||
}, | ||
"scripts": { | ||
"set-license-header": [ | ||
"@php ./vendor/bin/header-stamp --license=\"assets/afl.txt\" --exclude=\".github,node_modules,vendor\"" | ||
] | ||
}, | ||
"require-dev": { | ||
"prestashop/php-dev-tools": "^3.4" | ||
}, | ||
"author": "PrestaShop" | ||
} |
Oops, something went wrong.