Only run code coverage report on non-fork branches

Codacy's coverage report feature requires the use of a secret key, which
is only available on the main repo and is not available on forks. So,
the step has been always failing on any forks. This commit ensures that
we only run it on non-forks.

This greatly diminishes the value of the coverage reports. I've talked
to one of the Codacy people and advised that they should just have an
API key for coverage reports which is not a secret, like what bugsnag
does.
This commit is contained in:
Jesse Duffield 2024-05-19 14:05:30 +10:00
parent 189f39de2b
commit 36e7524146

View file

@ -188,6 +188,7 @@ jobs:
upload-coverage:
# List all jobs that produce coverage files
needs: [unit-tests, integration-tests]
if: github.event.repository.fork == false
runs-on: ubuntu-latest
steps:
- name: Checkout code