# Approach for using codecov with subpackages

**URL:** https://discourse.julialang.org/t/approach-for-using-codecov-with-subpackages/95438
**Category:** General Usage
**Tags:** codecov
**Created:** [March 2, 2023, 12:05pm UTC](https://discourse.julialang.org/t/approach-for-using-codecov-with-subpackages/95438 "2023-03-02T12:05:14Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![beorostica](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/beorostica/32/47342_2.png) [@beorostica](https://discourse.julialang.org/u/beorostica)
#### Post date: [March 2, 2023, 12:05pm UTC](https://discourse.julialang.org/t/approach-for-using-codecov-with-subpackages/95438/1 "2023-03-02T12:05:14Z")

</div>

I want to know how to use codecov when there are subpackages in a github repo.

Initially, I was working in a repo with codecov configured in the CI workflow and everything worked as expected. However, once we started to divide our package into a couple of subpackages (or subdirectories), codecov only displays the changes made in the root repo and not in the subpackages.

I think there are 2 possibilities to configure codecov with subpackages:

1. To configure once in the CI of the root repo, or
2. To configure codecov for each new subpackage

How to configure codecov with subpackages?  
I will really appreciate any guidance.

---

<div class="post-metadata">

### Author: ![fredrikekre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fredrikekre/32/1688_2.png) [@fredrikekre](https://discourse.julialang.org/u/fredrikekre)
#### Post date: [March 2, 2023, 12:22pm UTC](https://discourse.julialang.org/t/approach-for-using-codecov-with-subpackages/95438/2 "2023-03-02T12:22:48Z")

</div>

If you are using [julia-actions/julia-processcoverage](https://github.com/julia-actions/julia-processcoverage) you might have to adjust the [`directories` input parameter](https://github.com/julia-actions/julia-processcoverage/blob/03114f09f119417c3242a9fb6e0b722676aedf38/action.yml#L10-L13) to also include the directories with subpackages.

---

<div class="post-metadata">

### Author: ![beorostica](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/beorostica/32/47342_2.png) [@beorostica](https://discourse.julialang.org/u/beorostica)
#### Post date: [March 3, 2023, 3:06pm UTC](https://discourse.julialang.org/t/approach-for-using-codecov-with-subpackages/95438/3 "2023-03-03T15:06:02Z")

</div>

Indeed we use [julia-actions/julia-processcoverage](https://github.com/julia-actions/julia-processcoverage). Your solution is great and fits our needs. Thank you!!!

---

<div class="post-metadata">

### Author: ![beorostica](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/beorostica/32/47342_2.png) [@beorostica](https://discourse.julialang.org/u/beorostica)
#### Post date: [March 6, 2023, 5:12pm UTC](https://discourse.julialang.org/t/approach-for-using-codecov-with-subpackages/95438/4 "2023-03-06T17:12:09Z")

</div>

Hi again:

Reviewing the codecov platform, even though now the folders appear, the coverage percentage is zero. It’s like it’s not detecting the process step for testing the runtests.jl in each subfolder.

This is the [codecov](https://app.codecov.io/gh/cncastillo/KomaMRI.jl) and this is the [ci.yml](https://github.com/cncastillo/KomaMRI.jl/blob/master/.github/workflows/ci.yml).

Any suggestions?
