Skip to content

Commit 38e67c7

Browse files
committed
Send coverage to Scrutinizer
1 parent 15eae3d commit 38e67c7

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

.github/workflows/tests.yml

+10
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ jobs:
3131
- { php-version: 'nightly', os: ubuntu-latest, experimental: true }
3232
steps:
3333
- uses: actions/checkout@v4
34+
with:
35+
# Fetch 10 commits or Scrutinizer will throw ("Failed to retrieve commit parents. If you use a shallow git checkout, please checkout at least a depth of one."), see: RepositoryIntrospector at scrutinizer-ci/ocular GitHub repository
36+
# 10 commits is an arbitrary value that is more than 1 commit
37+
fetch-depth: 10
3438
- name: Use php ${{ matrix.php-version }}
3539
uses: shivammathur/setup-php@v2
3640
with:
@@ -59,3 +63,9 @@ jobs:
5963
with:
6064
file: "./build/logs/clover.xml"
6165
token: ${{ secrets.CODECOV_TOKEN }}
66+
- name: Upload Scrutinizer coverage
67+
uses: sudo-bot/action-scrutinizer@latest
68+
# Do not run this step on forked versions of the main repository (example: contributor forks)
69+
if: github.repository == 'wdes/simple-php-model-system'
70+
with:
71+
cli-args: "--format=php-clover build/logs/clover.xml --revision=${{ github.event.pull_request.head.sha || github.sha }}"

0 commit comments

Comments
 (0)