Skip to content

Commit

Permalink
Testing setup PHP: using parallel-lint tool
Browse files Browse the repository at this point in the history
  • Loading branch information
jrfnl committed Sep 21, 2021
1 parent 40a1261 commit a18506e
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,29 +48,27 @@ jobs:
name: "Lint: PHP ${{ matrix.php }}"
continue-on-error: ${{ matrix.experimental }}

env:
PL_CLI_ARGS: . -e php,phps --exclude vendor --exclude .git --exclude build

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Install PHP
uses: shivammathur/setup-php@v2
uses: shivammathur/setup-php@develop
with:
php-version: ${{ matrix.php }}
coverage: none
tools: cs2pr

# Install dependencies and handle caching in one go.
# @link https://github.com/marketplace/actions/install-composer-dependencies
- name: Install Composer dependencies
uses: "ramsey/composer-install@v1"
tools: cs2pr, parallel-lint

- name: Lint against parse errors
if: ${{ matrix.php != '8.1' }}
run: composer lint -- --checkstyle | cs2pr
if: ${{ matrix.php != '8.1' && matrix.php != '7.2' }}
run: parallel-lint ${{ env.PL_CLI_ARGS }} --checkstyle | cs2pr

- name: Lint against parse errors (PHP 8.1)
if: ${{ matrix.php == '8.1' }}
run: composer lint
if: ${{ matrix.php == '8.1' || matrix.php == '7.2' }}
run: parallel-lint ${{ env.PL_CLI_ARGS }}

test:
needs: ['coding-standard', 'lint']
Expand Down

0 comments on commit a18506e

Please sign in to comment.