Skip to content

Add JUnit reporter #558

Add JUnit reporter

Add JUnit reporter #558

Workflow file for this run

name: Test
on:
push:
branches:
- main
pull_request:
jobs:
test:
name: PHP ${{ matrix.php-version }} + ${{ matrix.dependencies }}
runs-on: ubuntu-latest
strategy:
matrix:
php-version:
- 8.0
- 8.1
- 8.2
dependencies: [highest]
include:
- php-version: 8.0
dependencies: lowest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install PHP with extensions
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
coverage: pcov
tools: composer:v2
ini-file: development
- name: Install Composer dependencies ${{ matrix.dependencies }}
uses: ramsey/composer-install@v2
with:
dependency-versions: ${{ matrix.dependencies }}
composer-options: --prefer-dist --prefer-stable
- name: Validate lowest dependencies
run: vendor/bin/validate-prefer-lowest
if: ${{ matrix.dependencies == 'lowest' }}
- name: Run tests with PHPUnit
run: vendor/bin/phpunit --coverage-clover build/logs/clover.xml
- name: Send coverage to Codecov
uses: codecov/codecov-action@v3
with:
file: build/logs/clover.xml