Codecov ignores the main files but includes the test files

Description

Hi, I’m trying to setup codecov for the first time but I’m having troubles. It is showing only the test files, the main files are being ignored:

I tried so many things but I’m running out of ideas and search results.

The coverage report generated at GitHub Actions is attached in the action:
https://github.com/AsyncMC/Bedrock-Protocol/actions/runs/120592128

Repository

The project is brand new, I’m setting up all the environment before writing the classes. I made some dummy classes to test codecov. Please see the setup branch, master has only the initial commit right now
https://github.com/AsyncMC/Bedrock-Protocol/commits/setup

CI/CD

Please provide which CI/CD you are using

Uploader

Please provide which uploader you are using and command used to run it. If you are not using the bash uploader, we recommend switching to it before opening an issue here.

I’m using GitHub workflows: https://github.com/AsyncMC/Bedrock-Protocol/blob/setup/.github/workflows/codecov.yml

Commit SHAs

Please include the commit SHA(s)
ea3f533237ec1d4e7aaaee78d50ebad7d7d7141a
fd7df122ab0613752b8b85a28b569dc851b5ae94
f6761683cbfadebc94b31a46fa8edc479cae4188
5614f78c98a47087503bbdb5c304b1870263a7b8
fa28aa275a955696ab11c3dea0670aeada0d62ed
308733bd54367a542dbc7bfc75fabec0e9b1931c
be88a182bdbff08c8f4ff5803345edc8c5363da3

Codecov YAML

Please include the codecov.yml as code

Empty, but I tried with the content below but without progress:

fixes:
  - "::src/main/kotlin/"

And:

fixes:
  - "::dummy/"

Codecov Output

Please provide the full output of running the uploader on your CI/CD

 / ____|        | |
| |     ___   __| | ___  ___ _____   __
| |    / _ \ / _` |/ _ \/ __/ _ \ \ / /
| |___| (_) | (_| |  __/ (_| (_) \ V /
 \_____\___/ \__,_|\___|\___\___/ \_/
                              Bash-20200430-d757c17


==> GitHub Actions detected.
    project root: .
    Yaml found at: .codecov.yml
    -> Found 1 reports
==> Detecting git/mercurial file structure
==> Reading reports
    + ./build/reports/jacoco/test/jacocoTestReport.xml bytes=6490
==> Appending adjustments
    https://docs.codecov.io/docs/fixing-reports
    + Found adjustments
==> Gzipping contents
==> Uploading reports
    url: https://codecov.io
    query: branch=setup&commit=ea3f533237ec1d4e7aaaee78d50ebad7d7d7141a&build=120592128&build_url=http%3A%2F%2Fgithub.com%2FAsyncMC%2FBedrock-Protocol%2Factions%2Fruns%2F120592128&name=&tag=&slug=AsyncMC%2FBedrock-Protocol&service=github-actions&flags=unittests&pr=&job=
    -> Pinging Codecov
https://codecov.io/upload/v4?package=bash-20200430-d757c17&token=secret&branch=setup&commit=ea3f533237ec1d4e7aaaee78d50ebad7d7d7141a&build=120592128&build_url=http%3A%2F%2Fgithub.com%2FAsyncMC%2FBedrock-Protocol%2Factions%2Fruns%2F120592128&name=&tag=&slug=AsyncMC%2FBedrock-Protocol&service=github-actions&flags=unittests&pr=&job=
    -> Uploading
    -> View reports at https://codecov.io/github/AsyncMC/Bedrock-Protocol/commit/ea3f533237ec1d4e7aaaee78d50ebad7d7d7141a

Additional Information

Any additional information, configuration or data that might be necessary to reproduce the issue.

Everything is public in the repository

Yay! I finally discovered the issue!

Codecov does not support the Kotlin feature which let us put Kotlin files anywhere. My files were directly at src/main/kotlin and were skipping the unnecessary boilerplate directory structure.

After moving them to the same dir structure as their package, codecov detected the files. That might be fixable with some settings, provably the fixes somehow, the one which I was twerking

1 Like

Amazing! Thanks for replying back with your solution @joserobjr.