fix(ci): stop coverage badge git 400 from breaking the pipeline#194
Merged
Conversation
The actions/checkout v5 -> v7 bump made the test job persist git auth via http.extraheader. The we-cli/coverage-badge-action runs its own nested checkout of gh-pages in the same workspace, and the leftover credential header conflicted with its auth, making git fail with HTTP 400 and taking down the whole CI run (including publish-npm). - Set persist-credentials: false on the test-job checkout (it only runs tests and yarn install, so it needs no persisted git credentials). - Mark the cosmetic badge step continue-on-error so a gh-pages push can never block the release pipeline again. - Pin coverage-badge-action to a commit SHA instead of @main.
Contributor
|
🎉 This PR is included in version 3.0.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
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.
Problem
The
testjob started failing onmainafter #192 bumpedactions/checkout@v5→@v7. The failing step is Update Coverage Badge (we-cli/coverage-badge-action@main), not the tests:Because the badge step is in the
testjob, its failure also blockspublish-npm.Root cause
actions/checkout@v7persists git auth viahttp.extraheaderin.git/config. The badge action runs its own nested checkout ofgh-pagesin the same workspace; the leftover credential header conflicts with its auth and git rejects the request with HTTP 400.Last
@v5run passed; first@v7run failed. Only the action versions changed between them.Fix
persist-credentials: falseon thetest-job checkout — root cause. The job only runsyarn test:cov+yarn install, so it never needs persisted git credentials. No leftover header = no conflict.continue-on-error: trueon the badge step — safety net. A cosmetic gh-pages badge push must never take down the release pipeline again.coverage-badge-actionto commit SHA8a0b6ee(was@main) for reproducibility + supply-chain safety.Testing
Full suite green locally: 248/248 tests pass. Change is workflow YAML only.