CircleCI upload to Codecov is not working

Viewed 226

I am using CircleCI with Cobertura and Codecov. But when I tried to upload the coverage report, I got this message.

->  Pinging Codecov
https://codecov.io/upload/v4?package=bash-20210309-2b87ace&token=secret&branch=main&commit=c4c31923a50262c49c578877bab7fee78a3781ff&build=81&build_url=&name=81&tag=&slug=TerabyteTB%2FWhirlpoolEditor&service=circleci&flags=&pr=&job=0&cmd_args=f,n,t
HTTP 400
Provided token is not a UUID.

400

Here is my config.yml file:

version: 2.1

orbs:
  maven: circleci/maven@1.1
  codecov: codecov/codecov@1.0.2
  
jobs:
  build:
    docker: 
      - image: circleci/openjdk:8-jdk-stretch
    steps: 
      - checkout
      - run:
          name: Run tests
          command: mvn -f Editor/ clean install; mvn -f Editor cobertura:cobertura
      - codecov/upload:
          file: Editor/target/site/cobertura/coverage.xml
      
workflows:
  test:
    jobs:
      - build
1 Answers

Although the Codecov document says upload token not required for Circle CI, it asks for token information.

You can set the token that Codevoc gives you under codecov/upload like this.

- codecov/upload:
         file: Editor/target/site/cobertura/coverage.xml
         **token: YOUR_TOKEN_INFO**
Related