Skip to content

Unevaluated properties #519

Unevaluated properties

Unevaluated properties #519

Workflow file for this run

name: CI
on: [push, pull_request]
jobs:
tests:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
strategy:
matrix:
php: ['8.4', '8.5']
include:
- php: '8.5'
coverage: 'true'
name: PHP ${{ matrix.php }} tests
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: mbstring
coverage: ${{ matrix.coverage && 'xdebug' || 'none' }}
- name: Install dependencies
run: composer update --no-interaction
# Run tests WITHOUT coverage on non-coverage matrix jobs.
# Full draft coverage is enabled on master and scheduled runs.
- name: Execute tests
if: ${{ !matrix.coverage }}
env:
PHPUNIT_FULL_DRAFT_COVERAGE: ${{ (github.ref == 'refs/heads/master' || github.event_name == 'schedule' || github.event_name == 'pull_request') && '1' || '' }}
run: ./vendor/bin/phpunit --testdox
# Run tests WITH Clover coverage for the coverage job.
# Full draft coverage is enabled on master, PRs, and scheduled runs.
- name: Execute tests with coverage (Clover)
if: ${{ matrix.coverage }}
env:
XDEBUG_MODE: coverage
PHPUNIT_FULL_DRAFT_COVERAGE: ${{ (github.ref == 'refs/heads/master' || github.event_name == 'schedule' || github.event_name == 'pull_request') && '1' || '' }}
run: ./vendor/bin/phpunit --coverage-clover=build/logs/clover.xml --testdox
- name: Upload coverage to Qlty
if: ${{ matrix.coverage }}
uses: qltysh/qlty-action/coverage@v2
with:
oidc: true
files: build/logs/clover.xml
- name: Upload the reports to coveralls.io
if: ${{ matrix.coverage }}
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
file: build/logs/clover.xml
format: clover
flag-name: Unit
allow-empty: false