Skip to content

feat: Library rework #13

feat: Library rework

feat: Library rework #13

Workflow file for this run

name: Unit tests
on:
push:
paths:
- "src/**"
- "tests/**"
- "phpunit.xml"
pull_request:
paths:
- "src/**"
- "tests/**"
- "phpunit.xml"
jobs:
upload_coverage:
name: Upload coverage to Codecov
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Cache Composer dependencies
uses: actions/cache@v4
with:
path: /tmp/composer-cache
key: ${{ runner.os }}-${{ hashFiles('**/composer.lock') }}
- name: Install dependencies
uses: php-actions/composer@v6
with:
php_version: "8.1"
php_extensions: xdebug
- name: Run tests and collect coverage
run: vendor/bin/phpunit --coverage-clover=coverage.xml
env:
XDEBUG_MODE: coverage
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}