Skip to content

Commit

Permalink
Malformed github action
Browse files Browse the repository at this point in the history
  • Loading branch information
PierreRambaud committed Apr 16, 2021
1 parent 5ab0a9d commit 5a25ec0
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 45 deletions.
39 changes: 12 additions & 27 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,50 +9,35 @@ jobs:
matrix:
php: ['7.2', '7.3', '7.4', '8.0']
steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}

- name: Checkout
uses: actions/checkout@v2.0.0

- name: PHP Syntax Checker
run: sh -c "! (find . -type f -name \"*.php\" $1 -exec php -l -n {} \; | grep -v \"No syntax errors detected\")"

- name: PHP syntax checker 7.4
uses: prestashop/github-action-php-lint/7.4@master

- name: PHP syntax checker 8.0
uses: prestashop/github-action-php-lint/8.0@master

# Check the PHP code follow the coding standards
php-cs-fixer:
name: PHP-CS-Fixer
runs-on: ubuntu-latest
strategy:
matrix:
php: ['7.3', '7.4']
php: ['7.2', '7.3', '7.4', '8.0']
steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
coverage: xdebug

- uses: actions/checkout@v2

- name: Get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
php-version: ${{ matrix.php }}

- name: Cache dependencies
uses: actions/cache@v2
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-
- name: Checkout
uses: actions/checkout@v2

- name: Install dependencies
- name: Composer Install
run: composer install --ansi --prefer-dist --no-interaction --no-progress --quiet

- name: PHPUnit
run: ./vendor/bin/phpunit --coverage-clover build/clover.xml

- name: PHP CS Fixer
run: ./vendor/bin/php-cs-fixer fix --dry-run
- name: Run PHP CS Fixer
run: ./vendor/bin/php-cs-fixer fix --dry-run --diff
35 changes: 17 additions & 18 deletions tests/modules_samples/constant_check/composer.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
{
"license": "AFL-3.0",
"require": {
"phpstan/phpstan": "^0.12",
"prestashop/php-dev-tools": "@dev"
},
"autoload": {
"classmap": [
"constant_check.php"
]
},
"repositories": [
{
"type": "path",
"url": "../../.."
}
],
"author": "PrestaShop"
}
"license": "MIT",
"require": {
"phpstan/phpstan": "^0.12",
"prestashop/php-dev-tools": "@dev"
},
"autoload": {
"classmap": [
"constant_check.php"
]
},
"repositories": [
{
"type": "path",
"url": "../../.."
}
]
}

0 comments on commit 5a25ec0

Please sign in to comment.