Skip to content

Coverage upload to Codecov fails on main branch #623

@bouweandela

Description

@bouweandela

It looks like coverage upload is failing on the main branch because a token is not configured. For example, coverage upload in this job (https://github.com/xarray-contrib/cf-xarray/actions/runs/23146050340/job/67234365718) failed with:

error - 2026-03-16 13:27:53,656 -- Upload failed: {"message":"Token required because branch is protected"}

This results in inaccurate coverage reports on pull requests, e.g. #622 (comment), where lines are reported as missing coverage, while they are in fact executed when running the tests.

This issue can likely be solved by setting up a Codecov token for this repository. See https://docs.codecov.com/docs/codecov-tokens for further info.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions