Repository navigation
Bump WordPress/props-bot-action from 635b2c5330167e194cd7b2c8a909991592a5022d to 496473a3d11a263c17653aa9a00a98b8ed1479f8 #1210
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: PHPUnit Tests | |
| on: | |
| push: | |
| branches: | |
| - trunk | |
| - 'branch/*' | |
| pull_request: | |
| branches: | |
| - trunk | |
| - 'branch/*' | |
| jobs: | |
| test: | |
| name: PHP ${{ matrix.php }} | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| event: ['${{ github.event_name }}'] | |
| php: ['7.4', '8.0', '8.1', '8.2', '8.3', '8.4'] | |
| exclude: | |
| # On PRs: only test minimum and latest PHP versions | |
| - event: 'pull_request' | |
| php: '8.0' | |
| - event: 'pull_request' | |
| php: '8.1' | |
| - event: 'pull_request' | |
| php: '8.2' | |
| - event: 'pull_request' | |
| php: '8.3' | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # v2.37.0 | |
| with: | |
| php-version: ${{ matrix.php }} | |
| coverage: xdebug | |
| tools: composer:v2 | |
| - name: Install dependencies | |
| run: | | |
| composer install --no-progress --prefer-dist --no-interaction | |
| - name: Run PHPUnit with coverage | |
| run: mkdir -p coverage/phpunit && vendor/bin/phpunit --coverage-clover=coverage/phpunit/coverage.xml | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v6.0.0 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| slug: WordPress/secure-custom-fields | |
| files: ./coverage/phpunit/coverage.xml | |
| flags: phpunit | |
| name: phpunit-php-${{ matrix.php }} |