Skip to content

Improve tests and require strict metadata coverage #248

Improve tests and require strict metadata coverage

Improve tests and require strict metadata coverage #248

Workflow file for this run

name: Tests
on:
pull_request:
paths:
- "**.php"
- ".github/workflows/test.yml"
push:
branches: [main]
paths:
- "**.php"
- ".github/workflows/test.yml"
permissions:
contents: read
jobs:
test:
name: PHPUnit
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Setup PHP
uses: shivammathur/setup-php@2e947f1f6932d141d076ca441d0e1e881775e95b # v2.31.0
with:
php-version: '8.2'
coverage: xdebug
- name: Setup problem matchers for PHP
run: echo "::add-matcher::${{ runner.tool_cache }}/php.json"
- name: Setup problem matchers for PHPUnit
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
- name: Install dependencies with composer
run: composer install --prefer-dist
- name: Run phpunit
run: ./vendor/bin/phpunit --coverage-clover=coverage.xml
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673 # v4.5.0
with:
token: ${{ secrets.CODECOV_TOKEN }}