test-reporter icon indicating copy to clipboard operation
test-reporter copied to clipboard

Handling coverage reporting from PRs from forked repositories on Github Actions

Open tomato42 opened this issue 4 years ago • 0 comments

I've recently migrated from travis to github actions, and while most of the stuff works, the code coverage for PRs coming from forks doesn't.

This is because the CC_TEST_REPORTER_ID is not set then by github, see the Github documentation: https://docs.github.com/en/actions/reference/encrypted-secrets#using-encrypted-secrets-in-a-workflow

With the exception of GITHUB_TOKEN, secrets are not passed to the runner when a workflow is triggered from a forked repository.

and with no CC_TEST_REPORTER_ID the submission fails: https://github.com/tlsfuzzer/tlslite-ng/runs/1785404408?check_suite_focus=true#step:32:9

At the same time, coverage reporting to coveralls.io does, as it uses the GITHUB_TOKEN to authenticate to the coveralls.io API.

tomato42 avatar Jan 28 '21 17:01 tomato42