Blog Post

January Product Update: Updating the Codecov CI Uploaders to the Codecov CLI

January 31, 2024 Tom Hu

Updating the Codecov CI Uploaders to the Codecov CLI

We released the Codecov CLI in June 2023. The CLI has helped to power new features including local upload, the global upload token, and new upcoming features.

However, users of our CI-specific uploaders, including the following, have not been able to access these features without using the raw CLI.

To remedy this, we will be releasing new versions of each uploader that will use the CLI as the underlying platform.

What will I need to do?

To use the CLI, you will need to update to the latest versions of the Action/Orb/Step. For all uploaders, this will be version 4.0.0.

GitHub Action

- name: Upload coverage reports to Codecov
- uses: codecov/codecov-action@v4
  with:
    token: ${{ secrets.CODECOV_TOKEN }}

 
or the token can be passed as an environment variable

- name: Upload coverage reports to Codecov
- uses: codecov/codecov-action@v4
  env:
    CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

CircleCI Orb

orbs:
  codecov: codecov/codecov@4.0.0
…
jobs:
  test:
    steps:
      - …
      - codecov/upload
          token: $CODECOV_TOKEN

 

Bitrise Step

- codecov@4:
    inputs:
      - CODECOV_TOKEN: "$CODECOV_TOKEN"

 

Future of tokenless

Currently, tokenless uploading is only available to forks attempting to create PRs on public repositories. This means that for most use cases, you will still need a token, even for public repositories. However, contributors creating PRs from their forks to the upstream repo will be able to get coverage information from Codecov.

Can I still use an older version?

Yes, you can continue to use the older versions of each CI uploader. However, these versions will no longer be supported by the Codecov team. Be aware that if you are using Dependabot or similar, you may still get PRs to update to the latest versions.

Looking for more ways to upload to Codecov? Check out our docs. If you have any questions or concerns, please reach out to us on our feedback repo.

Before we redirect you to GitHub...
In order to use Codecov an admin must approve your org.