Skip to content

Codecov uploads from main have been failing since October 2024 #98

Open

Description

@mmcky

Coverage has not been recorded for main since October 2024. The upload step in CI fails on every push, but fail_ci_if_error: false hides it, so CI stays green.

What happens

The upload runs from the Python 3.12 / Sphinx 8 job. In the push run for cccfb87 on 2026-11-10, the uploader logs Branch main is protected but no token was provided, then Commit creating failed: {"message":"Token required because branch is protected"}. The workflow uploads without a token (the tokenless setup described in the v1.1.1 CHANGELOG), and Codecov rejects tokenless uploads for main, even though main has no GitHub branch protection.

Codecov's API for the repository reports the last update on 2024-10-08, and it still lists the default branch as master; the repository's default branch is main. So the coverage figure on Codecov and the README badge both reflect October 2024.

Suggested changes

  • Add a CODECOV_TOKEN repository secret, taken from the repository's Codecov settings, and pass it as token: ${{ secrets.CODECOV_TOKEN }}. Alternatively, use OIDC with use_oidc: true and permissions: id-token: write on the job, which needs no stored secret.
  • In Codecov's repository settings, change the default branch from master to main.
  • Consider fail_ci_if_error: true for pushes to main, so a broken upload shows up. Keep it false for pull requests, because fork PRs cannot read secrets.

Upgrading codecov/codecov-action itself is part of the CI actions update in #101, which also renames the file input to files.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions