Skip to content

Update dependency phpunit/phpunit to v11 #209

Update dependency phpunit/phpunit to v11

Update dependency phpunit/phpunit to v11 #209

Workflow file for this run

name: Build
on:
push:
branches:
- main
- 'feature/**'
pull_request:
branches:
- main
- 'feature/**'
jobs:
test:
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system: ['ubuntu-latest', 'windows-latest', 'macos-latest']
php-versions: ['8.0', '8.1']
phpunit-versions: ['latest']
include:
- operating-system: 'ubuntu-latest'
php-versions: '7.2'
phpunit-versions: '8.5.13'
steps:
- uses: actions/checkout@v4
- name: Setup PHP with Xdebug 2.x
uses: shivammathur/setup-php@v2
with:
coverage: xdebug
- name: Validate composer.json and composer.lock
run: composer validate --strict
- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v4
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
- name: Install dependencies
run: composer install --prefer-dist --no-progress
# Add a test script to composer.json, for instance: "test": "vendor/bin/phpunit"
# Docs: https://getcomposer.org/doc/articles/scripts.md
- name: Run test suite
run: composer test
coverage:
name: Code Coverage
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup PHP with Xdebug 2.x
uses: shivammathur/setup-php@v2
with:
coverage: xdebug
- name: Validate composer.json and composer.lock
run: composer validate --strict
- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v4
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
- name: Install dependencies
run: composer install --prefer-dist --no-progress
- name: Coverage
run: vendor/bin/phpunit --coverage-clover coverage.xml --stderr tests
- name: CodeCov
run: bash <(curl -s https://codecov.io/bash)