Repository navigation
fix: skip Codecov upload when CODECOV_TOKEN is unavailable (Dependabot PRs) - #11
Merged
Merged
Conversation
…t PRs) Same root cause as the Snyk fix in #10: CODECOV_TOKEN is an Actions secret, which GitHub withholds from Dependabot-triggered pull_request runs. Combined with fail_ci_if_error: true, that turned a harmless missing-token situation into a hard job failure on every Dependabot CI-bump PR (confirmed on PR #8 after rebasing onto the #10 fixes: pytest itself passed, then the Codecov upload step failed with "Token required - not valid tokenless upload"). Verified with actionlint (clean) and the full local suite (148 passed, 2 skipped, OPENAI_API_KEY/ANTHROPIC_API_KEY unset).
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.
Summary
Follow-up to #10, same root cause, different secret:
CODECOV_TOKENis an Actions secret, which GitHub withholds from Dependabot-triggeredpull_requestruns. Combined withfail_ci_if_error: true, that turned a harmless missing-token situation into a hard job failure on every Dependabot CI-bump PR — confirmed by rebasing PR #8 onto the #10 fixes: pytest itself passed cleanly, then the Codecov upload step failed withToken required - not valid tokenless upload.Fix: promote
CODECOV_TOKENto job-levelenv(same pattern as the Snyk fix) and skip the upload step when it's empty. Real uploads still run normally on regular PRs/pushes tomainwhere the secret is available.Test plan
actionlint .github/workflows/*.yml— cleanruff check src tests/mypy src— cleanpytest tests --cov=src/prompt_optimizer— 148 passed, 2 skipped, 0 failed🤖 Generated with Claude Code
https://claude.ai/code/session_01D1NqmG98y1XiSRBYk4SXoU