diff options
author | William Desportes <williamdes@wdes.fr> | 2022-03-28 00:36:40 +0300 |
---|---|---|
committer | William Desportes <williamdes@wdes.fr> | 2022-03-28 00:36:40 +0300 |
commit | 8691e4af92d88ca6782060c45a6de040cf7cf10e (patch) | |
tree | b41b4b6ddebfec8a35998de98ee3741584470917 /.github/workflows | |
parent | 0d6175d6ca7942fb888782443b3291b91dd7b0d0 (diff) |
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>
Diffstat (limited to '.github/workflows')
-rw-r--r-- | .github/workflows/tests.yml | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 432978fc33..f1f14d8a6a 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -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 |