Add PHP 8.4 support #3
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: Build | |
| on: | |
| pull_request: | |
| branches: | |
| - '*' | |
| push: | |
| branches: | |
| - 'master' | |
| jobs: | |
| tests: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| php-version: | |
| - "8.1" | |
| - "8.2" | |
| - "8.3" | |
| - "8.4" | |
| dependencies: | |
| - lowest | |
| - highest | |
| platform-reqs: | |
| - use-platform-reqs | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v1 | |
| - name: Install PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php-version }} | |
| - name: Install PHIVE | |
| uses: szepeviktor/phive@v1 | |
| with: | |
| binPath: "${{ github.workspace }}/tools/phar/phive" | |
| - name: Cache Phive tools | |
| id: cache-phive | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.phive | |
| ${{ github.workspace }}/tools | |
| key: phive-${{ runner.os }}-${{ hashFiles('.phive/phars.xml') }} | |
| restore-keys: | | |
| phive-${{ runner.os }}- | |
| - name: Install PHAR tools with PHIVE | |
| if: steps.cache-phive.outputs.cache-hit != 'true' | |
| env: | |
| GITHUB_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: ${{ github.workspace }}/tools/phar/phive install --trust-gpg-keys C5095986493B4AA0 | |
| - name: Force HTTPS for forked libraries only | |
| run: | | |
| git config --global url."https://github.com/Oryss/php-unilex".insteadOf "git@github.com:Oryss/php-unilex" | |
| git config --global url."https://github.com/Oryss/php-json-data".insteadOf "git@github.com:Oryss/php-json-data" | |
| git config --global url."https://github.com/Oryss/php-int-rangesets".insteadOf "git@github.com:Oryss/php-int-rangesets" | |
| git config --global url."https://github.com/Oryss/php-ucd".insteadOf "git@github.com:Oryss/php-ucd" | |
| - name: Install lowest dependencies | |
| if: ${{ matrix.dependencies == 'lowest' && matrix.platform-reqs == 'use-platform-reqs' }} | |
| run: composer update --no-interaction --prefer-lowest | |
| - name: Install lowest dependencies (ignore platform reqs) | |
| if: ${{ matrix.dependencies == 'lowest' && matrix.platform-reqs == 'ignore-platform-reqs' }} | |
| run: composer update --no-interaction --prefer-lowest --ignore-platform-reqs | |
| - name: Install highest dependencies | |
| if: ${{ matrix.dependencies == 'highest' && matrix.platform-reqs == 'use-platform-reqs' }} | |
| run: composer update --no-interaction | |
| - name: Install highest dependencies (ignore platform reqs) | |
| if: ${{ matrix.dependencies == 'highest' && matrix.platform-reqs == 'ignore-platform-reqs' }} | |
| run: composer update --no-interaction --ignore-platform-reqs | |
| - name: Build tables | |
| run: composer build | |
| - name: Run tests | |
| run: composer test | |
| - name: Run infection | |
| env: | |
| STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }} | |
| if: ${{ env.STRYKER_DASHBOARD_API_KEY }} | |
| run: composer infection | |
| - name: Upload coverage to Codecov.io | |
| run: bash <(curl -s https://codecov.io/bash -s "build/logs") | |
| continue-on-error: true | |
| - name: Upload coverage to Scrutinizer | |
| uses: sudo-bot/action-scrutinizer@latest | |
| with: | |
| cli-args: --format=php-clover build/logs/clover.xml | |
| continue-on-error: true |