Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test(coverage): only fail CI on main repo #17624

Conversation

mikehardy
Copy link
Member

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.

  • You have a descriptive commit message with a short title (first line, max 50 chars).
  • You have commented your code, particularly in hard-to-understand areas
  • You have performed a self-review of your own code
  • UI changes: include screenshots of all affected screens (in particular showing any new or changed strings)
  • UI Changes: You have tested your change using the Google Accessibility Scanner

otherwise this will fail builds on forks since codecov requires
upload tokens now

people *can* set that up, but if they have not we should not fail the build
@mikehardy
Copy link
Member Author

Current dependency updates PR will be a poor experience for forks until this is ingested on dependency-updates branch

@david-allison david-allison added the Needs Second Approval Has one approval, one more approval to merge label Dec 18, 2024
@david-allison david-allison merged commit da4396a into ankidroid:dependency-updates Dec 18, 2024
12 checks passed
@david-allison
Copy link
Member

david-allison commented Dec 18, 2024

This is a blocker on #17622. Merging

@github-actions github-actions bot removed the Needs Second Approval Has one approval, one more approval to merge label Dec 18, 2024
@github-actions github-actions bot added this to the 2.21 release milestone Dec 18, 2024
@mikehardy mikehardy deleted the no-coverage-fail-on-forks branch December 18, 2024 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants