Skip to content

Commit 83cc112

Browse files
committed
Improve and fix the Scrutinizer coverage upload
Signed-off-by: William Desportes <williamdes@wdes.fr>
1 parent 63e314c commit 83cc112

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

.github/workflows/tests.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ jobs:
2424
- { php-version: '8.1', php-extensions: '', composer-options: '--ignore-platform-req=php', experimental: true, os: ubuntu-latest }
2525
steps:
2626
- uses: actions/checkout@v2
27+
with:
28+
# Fetch some commits for Scrutinizer coverage upload
29+
fetch-depth: 15
2730
- name: Use php ${{ matrix.php-version }}
2831
uses: shivammathur/setup-php@v2
2932
with:
@@ -51,7 +54,7 @@ jobs:
5154
name: phpunit-${{ matrix.php-version }}-${{ matrix.php-extensions }}-${{ matrix.os }}
5255
- name: Send coverage to Scrutinizer
5356
uses: sudo-bot/action-scrutinizer@latest
54-
# Upload can fail on forks
55-
continue-on-error: true
57+
# Do not run this step on forked versions of the main repository (example: contributor forks)
58+
if: github.repository == 'phpmyadmin/shapefile'
5659
with:
57-
cli-args: "--format=php-clover build/logs/clover.xml"
60+
cli-args: "--format=php-clover build/logs/clover.xml --revision=${{ github.event.pull_request.head.sha || github.sha }}"

0 commit comments

Comments
 (0)