Upgrade PHPUnit #5
Workflow file for this run
This file contains 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: Run Tests | |
on: | |
push: | |
branches: | |
- gh-pages | |
- "**" | |
jobs: | |
test: | |
name: Test - PHP ${{ matrix.php }} - ${{ matrix.setup }} | |
runs-on: ubuntu-latest | |
env: | |
CC_TEST_REPORTER_ID: a706e45a0731ff71fe03470fefba2e1469a856018f131d0aee0be3f26ec4fc16 | |
strategy: | |
matrix: | |
php: [7.1, 7.2, 7.3, 7.4, 8.0, 8.1, 8.2, 8.3, 8.4] | |
setup: [lowest, stable] | |
include: | |
- php: nightly | |
setup: stable | |
fail-fast: false | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
- name: Set up PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
tools: composer | |
- name: Cache/Restore Composer | |
uses: actions/cache@v4 | |
with: | |
path: ~/.composer/cache | |
key: ${{ runner.os }}-${{ matrix.php }}-${{ matrix.setup }}-composer-${{ hashFiles('**/composer.lock') }} | |
- name: Set PHPUnit version | |
if: matrix.php >= 8.1 | |
run: composer require "phpunit/phpunit:^8.5.41" --no-update | |
- name: Install Dependencies | |
run: composer update --prefer-dist --prefer-${{ matrix.setup }} --no-interaction --no-suggest | |
- name: Run Tests | |
run: vendor/bin/phpunit --coverage-clover=coverage.xml --coverage-text --log-junit test-results.xml | |
- name: Upload Test Results | |
if: matrix.php == 7.4 && matrix.setup == 'stable' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: "${{ matrix.php-version }}-phpunit-results" | |
path: test-results.xml | |
- name: Code Climate Test Reporter | |
if: matrix.php == 7.4 && matrix.setup == 'stable' | |
uses: aktions/codeclimate-test-reporter@v1 | |
with: | |
codeclimate-test-reporter-id: ${{ secrets.CC_TEST_REPORTER_ID }} | |
command: after-build -t clover | |
env: | |
ACTIONS_ALLOW_UNSECURE_COMMANDS: true | |
continue-on-error: true | |
- name: Coverage | |
if: matrix.php == 7.4 && matrix.setup == 'stable' | |
uses: codecov/codecov-action@v5 |