Skip to content

Run coveralls and codecov #3

Run coveralls and codecov

Run coveralls and codecov #3

name: Run coveralls and codecov
on:
push:
branches:
- main
paths-ignore:
- 'README.md'
- 'LICENSE'
- 'CHANGELOG.md'
- 'CONTRIBUTING.md'
- 'doc/**'
jobs:
phpunit:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.4'
coverage: xdebug
- name: Install dependencies
run: composer install --no-progress --no-suggest --prefer-dist
- name: Configure Xdebug
run: echo "xdebug.mode=coverage" >> $GITHUB_ENV
- name: Run PHPUnit
run: vendor/bin/phpunit --coverage-clover=coverage.xml
- name: Send coverage to Coveralls
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: coverage.xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: true
files: coverage.xml
flags: unittests
name: codecov-umbrella
token: ${{ secrets.CODECOV_TOKEN }}