Skip to content

Commit

Permalink
Added a github CI workflow that uploads test coverage to Scrutinizer
Browse files Browse the repository at this point in the history
manicki committed Dec 10, 2024
1 parent 2599aee commit 9861732
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/scrutinize.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Generate and upload test coverage
on:
workflow_run:
workflows: ['Lint and Test']
types:
- completed

jobs:
scrutinize:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.0'
coverage: xdebug
- name: Cache Composer packages
uses: actions/cache@v4
with:
path: vendor
key: ${{ runner.os }}-${{ hashFiles('**/composer.lock') }}
- name: Generate PHP tests coverage
run: vendor/bin/phpunit --coverage-clover coverage.clover
- name: Upload Scrutinizer coverage
uses: sudo-bot/action-scrutinizer@latest
with:
cli-args: "--repository g/wmde/Time --format=php-clover ./coverage.clover"

0 comments on commit 9861732

Please sign in to comment.