Merge pull request #6 from inpsyde/update-max-php-version #29
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: Unit Tests | |
| on: | |
| push: | |
| paths: | |
| - '**workflows/unit-tests.yml' | |
| - '**.php' | |
| - '**phpunit.xml.dist' | |
| pull_request: | |
| paths: | |
| - '**workflows/unit-tests.yml' | |
| - '**.php' | |
| - '**phpcs.xml.dist' | |
| workflow_dispatch: | |
| concurrency: | |
| group: "${{ github.workflow }}-${{ github.ref }}" | |
| cancel-in-progress: true | |
| jobs: | |
| unit-tests-php: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| php-ver: [ '7.4', '8.0', '8.1', '8.2', '8.3', '8.4' ] | |
| wp-ver: [ '5.9', '6.0', '6.1', '6.2', '6.3', '6.4', '6' ] | |
| exclude: | |
| - php-ver: '7.4' | |
| wp-ver: '6.3' | |
| - php-ver: '7.4' | |
| wp-ver: '6.4' | |
| - php-ver: '7.4' | |
| wp-ver: '6' | |
| - php-ver: '8.2' | |
| wp-ver: '5.9' | |
| - php-ver: '8.3' | |
| wp-ver: '5.9' | |
| - php-ver: '8.2' | |
| wp-ver: '6.0' | |
| - php-ver: '8.3' | |
| wp-ver: '6.0' | |
| - php-ver: '8.3' | |
| wp-ver: '6.1' | |
| - php-ver: '8.3' | |
| wp-ver: '6.2' | |
| - php-ver: '8.3' | |
| wp-ver: '6.3' | |
| - php-ver: '8.4' | |
| wp-ver: '6.3' | |
| include: | |
| - php-ver: '7.4' | |
| composer: '--ignore-platform-req=php' | |
| - php-ver: '8.0' | |
| composer: '--ignore-platform-req=php' | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php-ver }} | |
| ini-values: zend.assertions=1, error_reporting=-1, display_errors=On | |
| coverage: none | |
| - name: Adjust dependencies in 'composer.json' | |
| run: | | |
| composer remove roots/wordpress-no-content inpsyde/php-coding-standards vimeo/psalm syde/phpcs phpstan/phpstan --dev --no-update | |
| composer require "roots/wordpress-no-content:~${{ matrix.wp-ver }}.0" --dev | |
| - name: Install dependencies | |
| uses: ramsey/composer-install@v3 | |
| with: | |
| dependency-versions: ${{ matrix.dependency-versions }} | |
| composer-options: ${{ matrix.composer || '' }} | |
| - name: Run unit tests | |
| run: ./vendor/bin/phpunit --no-coverage |