Fixed: ignore whitespace after comparison in filter expression #171
Workflow file for this run
This file contains hidden or 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
| name: Test | |
| on: | |
| push: | |
| paths: | |
| - '**.php' | |
| - 'composer.json' | |
| branches: | |
| - 'main' | |
| pull_request: | |
| paths: | |
| - '**.php' | |
| - 'composer.json' | |
| workflow_dispatch: | |
| jobs: | |
| run: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| php: | |
| - '8.1' | |
| - '8.2' | |
| - '8.3' | |
| - '8.4' | |
| continue-on-error: ${{ matrix.php == '8.4' }} | |
| name: PHP ${{ matrix.php }} Test | |
| steps: | |
| - name: Git checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php }} | |
| extensions: json | |
| tools: phpcs | |
| coverage: pcov | |
| env: | |
| COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Setup problem matchers for PHP syntax check | |
| run: echo "::add-matcher::.github/php-syntax.json" | |
| - run: | | |
| ! find . -type f -name '*.php' -exec php -l '{}' \; 2>&1 |grep -v '^No syntax errors detected' | |
| - name: Setup problem matchers for PHPUnit | |
| run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" | |
| - name: Install dependencies | |
| run: composer update --prefer-dist --no-interaction | |
| - name: Run phpcs | |
| run: composer cs | |
| - name: Execute tests | |
| run: | | |
| set +e | |
| output=$(composer test -- --coverage-clover=coverage.xml 2>&1) | |
| exit_code=$? | |
| echo "$output" | |
| # If the only issue is the cache directory warning, ignore the exit code. | |
| if echo "$output" | grep -q "No cache directory configured, result of static analysis for code coverage will not be cached"; then | |
| echo "Ignoring known PHPUnit warning about missing cache directory." | |
| exit 0 | |
| else | |
| exit $exit_code | |
| fi | |
| - name: Run codecov | |
| uses: codecov/codecov-action@v4 |