Improve tests workflow to send the coverage to Scrutinizer in the right conditions

Copied from the sudo-bot/action-scrutinizer@latest action README

Signed-off-by: William Desportes <williamdes@wdes.fr>
This commit is contained in:
William Desportes 2022-03-27 23:33:02 +02:00
parent 9efba4848c
commit 0d6175d6ca
No known key found for this signature in database
GPG Key ID: 90A0EF1B8251A889

View File

@ -103,10 +103,10 @@ jobs:
name: phpunit-${{ matrix.php-version }}-${{ matrix.os }}
- name: Send coverage to Scrutinizer
uses: sudo-bot/action-scrutinizer@latest
# Upload can fail on forks
continue-on-error: true
# Do not run this step on forked versions of the main repository (example: contributor forks)
if: github.repository == 'phpmyadmin/phpmyadmin'
with:
cli-args: "--format=php-clover build/logs/clover.xml"
cli-args: "--format=php-clover build/logs/clover.xml --revision=${{ github.event.pull_request.head.sha || github.sha }}"
- name: Send coverage to Codacy
# Upload can fail on forks or if the secret is missing
continue-on-error: true
@ -157,10 +157,10 @@ jobs:
name: php-7.1-${{ matrix.extension }}-enabled
- name: Send coverage to Scrutinizer
uses: sudo-bot/action-scrutinizer@latest
# Upload can fail on forks
continue-on-error: true
# Do not run this step on forked versions of the main repository (example: contributor forks)
if: github.repository == 'phpmyadmin/phpmyadmin'
with:
cli-args: "--format=php-clover build/logs/clover.xml"
cli-args: "--format=php-clover build/logs/clover.xml --revision=${{ github.event.pull_request.head.sha || github.sha }}"
- name: Send coverage to Codacy
# Upload can fail on forks or if the secret is missing
continue-on-error: true