test(coverage): only fail CI on main repo #17624
Merged
+2
−2
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.
Purpose / Description
with the move to codecov action v5, upload tokens are either strictly required, or you have to have a public repository and go into your codecov settings on their website and allow uploads with no tokens
We allow uploads with no token on the main repository, but that was a specific setting change and there is no expectation that forks will do this, so uploads will fail for folks in the general case
We want the coverage fail signal on the main repo so I had set coverage upload failures to fail the build, but that's not a great experience for forks.
So now we only fail the build on coverage uploads if you are in the main repo
Fixes
Approach
use workflow templating and default-included variables to fail only on main repo
How Has This Been Tested?
workflows aren't easily testable but if this succeeds on my fork then at least it isn't failing there anymore, so pending the outcome of that:
Learning (optional, can help others)
Testing, false positives, false negatives - any time you increase testing you have to deal with both, and you'll get them...
Checklist
Please, go through these checks before submitting the PR.