Improve Codacy coverage sending workflow

Use the version that is on the README and only run on the main repo

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

View File

@ -108,9 +108,11 @@ jobs:
with:
cli-args: "--format=php-clover build/logs/clover.xml --revision=${{ github.event.pull_request.head.sha || github.sha }}"
- name: Send coverage to Codacy
uses: codacy/codacy-coverage-reporter-action@v1
# Do not run this step on forked versions of the main repository (example: contributor forks)
if: github.repository == 'phpmyadmin/phpmyadmin'
# Upload can fail on forks or if the secret is missing
continue-on-error: true
uses: codacy/codacy-coverage-reporter-action@master
with:
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
coverage-reports: build/logs/clover.xml
@ -162,9 +164,11 @@ jobs:
with:
cli-args: "--format=php-clover build/logs/clover.xml --revision=${{ github.event.pull_request.head.sha || github.sha }}"
- name: Send coverage to Codacy
uses: codacy/codacy-coverage-reporter-action@v1
# Do not run this step on forked versions of the main repository (example: contributor forks)
if: github.repository == 'phpmyadmin/phpmyadmin'
# Upload can fail on forks or if the secret is missing
continue-on-error: true
uses: codacy/codacy-coverage-reporter-action@master
with:
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
coverage-reports: build/logs/clover.xml