From 5a25ec011a43d5175e52d7b22ae1bf2053ae684c Mon Sep 17 00:00:00 2001 From: Pierre RAMBAUD Date: Fri, 16 Apr 2021 16:34:42 +0200 Subject: [PATCH] Malformed github action --- .github/workflows/php.yml | 39 ++++++------------- .../constant_check/composer.json | 35 ++++++++--------- 2 files changed, 29 insertions(+), 45 deletions(-) diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index 5b3b29b..65d9d10 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -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 diff --git a/tests/modules_samples/constant_check/composer.json b/tests/modules_samples/constant_check/composer.json index dade475..06c399e 100644 --- a/tests/modules_samples/constant_check/composer.json +++ b/tests/modules_samples/constant_check/composer.json @@ -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" -} \ No newline at end of file + "license": "MIT", + "require": { + "phpstan/phpstan": "^0.12", + "prestashop/php-dev-tools": "@dev" + }, + "autoload": { + "classmap": [ + "constant_check.php" + ] + }, + "repositories": [ + { + "type": "path", + "url": "../../.." + } + ] +}