# CircleCI do not update codecov report

**URL:** <https://community.codecov.com/t/circleci-do-not-update-codecov-report/3695>\
**Category:** Bug Fixes\
**Created:** [June 6, 2022, 9:24am UTC](https://community.codecov.com/t/circleci-do-not-update-codecov-report/3695 "2022-06-06T09:24:33Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![gruja.work](https://avatars.discourse-cdn.com/v4/letter/g/22d042/32.png) [@gruja.work](https://community.codecov.com/u/gruja.work)\
**Post date:** [June 6, 2022, 9:24am UTC](https://community.codecov.com/t/circleci-do-not-update-codecov-report/3695/1 "2022-06-06T09:24:33Z")

</div>

## Before submitting a topic, please confirm the following

I have searched for similar issues before creating this topic.  
 I have verified that my repository is using the [Codecov GitHub app](https://github.com/apps/codecov), if using GitHub  
 I have [validated](https://docs.codecov.com/docs/codecov-yaml#validate-your-repository-yaml) my `codecov.yaml` configuration file.  
 I have filled out the below sections to the best of my ability.

### Description

Hi, I want to use orb from CircleCI to upload coverage to codecov, but job dose not upload my test coverage, and if i run commands in local env my tests coverage is uploaded.  
It is only doing a command: `curl -fLso codecov https://codecov.io/bash` and then stops

 ![image](https://canada1.discourse-cdn.com/flex029/uploads/codecov/original/2X/7/780044298bc07f4477403252354c4e7071e5a570.jpeg)

### CI/CD URL

[LINK](https://app.circleci.com/pipelines/github/thales-markets/contracts/1812/workflows/9f49d9a8-3e23-4ee3-87df-98f314bfa1cc)

### Codecov Output

```auto
#!/bin/bash -eo pipefail
curl -fLso codecov https://codecov.io/bash
CircleCI received exit code 0

```

### Expected Results

Code coverage uploaded in on a [Codecov](https://app.codecov.io/gh/thales-markets/contracts)

### Actual Results

Uploading did’t happened.

### Additional Information

This is my yaml file for circeci

```auto
orbs: # declare what orbs we are going to use
  node: circleci/node@3.0.1 # the node orb provides common node-related configuration
  codecov: codecov/codecov@3.0.0

version: 2.1 # using 2.1 provides access to orbs and other features

jobs:
  test:
    executor: node/default
    steps:
      - checkout
      - node/install-packages:
          cache-path: ~/project/node_modules
          override-ci-command: npm install
      - run: npx hardhat compile --showsize --optimizer
      - run: npx hardhat test --optimizer
      - run: npx hardhat coverage
  codecov-job:
    docker:
      # replace with your preferred image
      - image: cimg/base:stable
    steps:
      - codecov/upload:
          file: './coverage.json'
          validate_url: false 
          
workflows:
  jobs-workflow:
    jobs:
      - codecov-job:
          requires:
            - test
      - test

```

---

<div class="post-metadata">

**Author:** ![tom](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/tom/32/8_2.png) [@tom](https://community.codecov.com/u/tom)\
**Post date:** [June 7, 2022, 3:11am UTC](https://community.codecov.com/t/circleci-do-not-update-codecov-report/3695/2 "2022-06-07T03:11:49Z")

</div>

@gruja.work, two things

1. Codecov is likely not finding any coverage reports to upload because you have separated them into separate jobs. You will need to either combine jobs or use CircleCI’s [workspaces](https://circleci.com/docs/2.0/workspaces/).
2. Please upgrade to the latest version of the Codecov orb, `3.2.3`

---

<div class="post-metadata">

**Author:** ![gruja.work](https://avatars.discourse-cdn.com/v4/letter/g/22d042/32.png) [@gruja.work](https://community.codecov.com/u/gruja.work)\
**Post date:** [June 7, 2022, 10:42am UTC](https://community.codecov.com/t/circleci-do-not-update-codecov-report/3695/3 "2022-06-07T10:42:14Z")

</div>

Hi @tom thanks for fast replay, and vary useful documentation, that helps!  
Now this upload part is “working” from CircleCI part but still have some issue regarding codecov representation in a UI.

Now here is my circeci yaml file

```auto
orbs: # declare what orbs we are going to use
  node: circleci/node@3.0.1 # the node orb provides common node-related configuration
  codecov: codecov/codecov@3.2.3

version: 2.1 # using 2.1 provides access to orbs and other features

jobs:
  test:
    executor: node/default
    steps:
      - checkout
      - node/install-packages:
          cache-path: ~/project/node_modules
          override-ci-command: npm install
      - run: npx hardhat compile --showsize --optimizer
      - run: npx hardhat test --optimizer
      - run:
          name: Create shared coverage outputs folder
          command: mkdir -p /tmp/coverage
      - run: npx hardhat coverage
      - run:
          name: Save coverage
          command: |
            cp coverage.json /tmp/coverage/coverage.json
      - persist_to_workspace:
          root: /tmp/coverage
          paths:
            - coverage.json
  codecov-job:
    docker:
      - image: cimg/base:stable
    steps:
      - attach_workspace:
          at: /tmp/coverage
      - codecov/upload:
          file: '/tmp/coverage/coverage.json'
          
workflows:
  jobs-workflow:
    jobs:
      - codecov-job:
          requires:
            - test
      - test

```

As you see on screen shot from [circleci](https://app.circleci.com/projects/github/thales-markets/contracts/config/?branchName=automation&pipelineNumber=1871) uploaded `coverage.json` file from that .yaml file

 ![image](https://canada1.discourse-cdn.com/flex029/uploads/codecov/original/2X/9/9bab9716a95859df3f97904d76ac8e408673e963.jpeg)

But i get in [codecov ui](https://app.codecov.io/gh/thales-markets/contracts/commit/ce562b623c59767b747b834de321e00426f90ab6) error: `upload is empty`

Here is that `coverage report` [file](https://api.codecov.io/upload/gh/thales-markets/contracts/download?path=v4/raw/2022-06-07/3453D974DB11599C9DA7413E9ADE2197/ce562b623c59767b747b834de321e00426f90ab6/8620a1ac-ec6b-46a5-90ab-1d40b8215a13.txt)

[codecov commit](https://app.codecov.io/gh/thales-markets/contracts/commit/ce562b623c59767b747b834de321e00426f90ab6)

---

<div class="post-metadata">

**Author:** ![tom](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/tom/32/8_2.png) [@tom](https://community.codecov.com/u/tom)\
**Post date:** [June 7, 2022, 5:29pm UTC](https://community.codecov.com/t/circleci-do-not-update-codecov-report/3695/4 "2022-06-07T17:29:09Z")

</div>

Ahhh @gruja.work can you add a `checkout` step before you call `- codecov/upload`

---

<div class="post-metadata">

**Author:** ![gruja.work](https://avatars.discourse-cdn.com/v4/letter/g/22d042/32.png) [@gruja.work](https://community.codecov.com/u/gruja.work)\
**Post date:** [June 7, 2022, 6:26pm UTC](https://community.codecov.com/t/circleci-do-not-update-codecov-report/3695/5 "2022-06-07T18:26:34Z")

</div>

@tom thanks man! it worked!

 ![image](https://canada1.discourse-cdn.com/flex029/uploads/codecov/original/2X/9/9dca0ac79de6def44c272e62b20159baeda702b3.png)
