GHA: Use python-pillow/Pillow's Codecov token for own builds#4266
Merged
radarhere merged 6 commits intopython-pillow:masterfrom Dec 24, 2019
Merged
GHA: Use python-pillow/Pillow's Codecov token for own builds#4266radarhere merged 6 commits intopython-pillow:masterfrom
radarhere merged 6 commits intopython-pillow:masterfrom
Conversation
Member
Author
|
Example build from my fork with a token in secrets:
Example build from my fork with no token in secrets:
Neither of these commits show up on CodeCov for upstream: |
This comment has been minimized.
This comment has been minimized.
Member
Author
|
All green now! |
radarhere
reviewed
Dec 15, 2019
fcd9439 to
1c90c9d
Compare
radarhere
reviewed
Dec 21, 2019
Member
Member
Author
Keep codecov-action
This was referenced Jan 8, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Currently we're using the Codecov token of python-pillow/Pillow for all builds, including builds in forks. This means we get coverage reports at Codecov from those builds, and fork builds do not get coverage for their own builds.
The Codecov tool can automatically figure out the repo, and a token isn't needed, on Travis CI and AppVeyor, but not yet for GitHub Actions.
So, let's remove the token from the config file.
Then forks will get their own coverage for Travis and AppVeyor (but not GHA).
No fork coverage is sent upstream.
But if we're doing a python-pillow/Pillow build on GHA, then first copy a config file containing the token into the root, so we do get GHA coverage.
Once Codecov update to autodetect on GHA, we can remove this workaround.
If you do want GHA coverage from your fork builds, fetch your token from https://codecov.io/gh/my-username/Pillow/settings and add it as
CODECOV_TOKENat https://github.com/my-username/Pillow/settings/secrets.We cannot rely on this secret alone for upstream, because secrets are not available to PRs, and we especially want coverage for PRs.