Codecov not discovering files when uploaded in CI

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, if using GitHub
I have validated my codecov.yaml configuration file.
I have filled out the below sections to the best of my ability.

Description

When running Codecov in GitHub Actions and uploading it there only coverage for a single config file is discovered. However, when running locally it all works as expected. I even downloaded the report artifacts created in the CI and uploaded them on my machine and Codecov then recognized them all.

CI/CD URL

Workflow YML: https://github.com/hydephp/framework/blob/master/.github/workflows/test-suite.yml
Link to latest run: https://github.com/hydephp/framework/runs/6738856737?check_suite_focus=true

Codecov Output

Please provide the full output of running the uploader on your CI/CD. This will typically have the Codecov logo as ASCII.

Run codecov/codecov-action@v3
  with:
    directory: ./build/coverage
==> linux OS detected
https://uploader.codecov.io/latest/linux/codecov.SHA256SUM
==> SHASUM file signed by key id 806bb28aed779869
==> Uploader SHASUM verified (648b599397548e4bb92429eec6391374c2cbb0edb835e3b3f03d4281c011f401  codecov)
==> Running version latest
==> Running version v0.2.3
/home/runner/work/_actions/codecov/codecov-action/v3/dist/codecov -n  -Q github-action-3.1.0 -s ./build/coverage
[2022-06-04T14:40:36.591Z] ['info'] 
     _____          _
    / ____|        | |
   | |     ___   __| | ___  ___ _____   __
   | |    / _ \ / _` |/ _ \/ __/ _ \ \ / /
   | |___| (_) | (_| |  __/ (_| (_) \ V /
    \_____\___/ \__,_|\___|\___\___/ \_/
  Codecov report uploader 0.2.3
[2022-06-04T14:40:36.599Z] ['info'] => Project root located at: /home/runner/work/framework/framework
[2022-06-04T14:40:36.601Z] ['info'] -> No token specified or token is empty
[2022-06-04T14:40:36.607Z] ['info'] Searching for coverage files...
[2022-06-04T14:40:36.692Z] ['info'] Warning: Some files located via search were excluded from upload.
[2022-06-04T14:40:36.692Z] ['info'] If Codecov did not locate your files, please review https://docs.codecov.com/docs/supported-report-formats
[2022-06-04T14:40:36.692Z] ['info'] => Found 2 possible coverage files:
  clover.xml
  cobertura.xml
[2022-06-04T14:40:36.692Z] ['info'] Processing build/coverage/clover.xml...
[2022-06-04T14:40:36.694Z] ['info'] Processing build/coverage/cobertura.xml...
[2022-06-04T14:40:36.703Z] ['info'] Detected GitHub Actions as the CI provider.
[2022-06-04T14:40:36.704Z] ['info'] Pinging Codecov: https://codecov.io/upload/v4?package=github-action-3.1.0-uploader-0.2.3&token=*******&branch=master&build=2439942730&build_url=https%3A%2F%2Fgithub.com%2Fhydephp%2Fframework%2Factions%2Fruns%2F2439942730&commit=70d1dd91dce67c5b01eed85fcf0c9dcb715710db&job=Test+Suite+%28Matrix%29&pr=&service=github-actions&slug=hydephp%2Fframework&name=&tag=&flags=&parent=
[2022-06-04T14:40:37.190Z] ['info'] https://codecov.io/github/hydephp/framework/commit/70d1dd91dce67c5b01eed85fcf0c9dcb715710db
https://storage.googleapis.com/codecov/v4/raw/2022-06-04/2B41805228C8FC3CF077669EBC9F8CF4/70d1dd91dce67c5b01eed85fcf0c9dcb715710db/efd019c9-69d5-472a-a8b3-b612da584143.txt?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=GOOG1EKKHVKCKHW7KBCGM7IHR55T63V2PAVJWLVFNITJHDU5G6R5IRN3LMWJA%2F20220604%2FUS%2Fs3%2Faws4_request&X-Amz-Date=20220604T144037Z&X-Amz-Expires=10&X-Amz-SignedHeaders=host&X-Amz-Signature=44c13193c3648f7897b6d780dc68aa8a3960b307351689dbd9f00635d0448612
[2022-06-04T14:40:37.190Z] ['info'] Uploading...
[2022-06-04T14:40:37.409Z] ['info'] {"status":"success","resultURL":"https://codecov.io/github/hydephp/framework/commit/70d1dd91dce67c5b01eed85fcf0c9dcb715710db"}

Expected Results

I expect that all files are discovered when using the CI uploader.

Actual Results

Only config/hyde.php is found when uploading in the CI.

Additional Information

Just want to mention that I’ve tried uploading from both the root working directory and subdirectory.

I also read about path fixing in the docs, but couldn’t get that to work, but I don’t think that’s the problem since I could upload files generated by a Ubuntu CI on my local Windows machine.

@hydephp, I have a few follow-up questions here.

  1. Can you provide the Codecov output when you run locally?
  2. Is there a Codecov URL for when you just upload locally?
  3. What happens when you run it on CI with verbose: true? Would you be able to provide that output?

Sorry for all the details requested, but it would help in trying to figure out why you are seeing the difference.

Thank you for the reply Tom! Since it’s still the weekend, it’s gonna take some time. I’ll try to get back to you today or tomorrow.

Alright, @tom, I hope this is everything you are looking for. If not, let me know.

(In the order I executed the steps)

3. Running CI with verbose output

Run codecov/codecov-action@v3
  with:
    directory: ./build/coverage
    verbose: true
  
==> linux OS detected
https://uploader.codecov.io/latest/linux/codecov.SHA256SUM
==> SHASUM file signed by key id 806bb28aed779869
==> Uploader SHASUM verified (648b599397548e4bb92429eec6391374c2cbb0edb835e3b3f03d4281c011f401  codecov)
==> Running version latest
==> Running version v0.2.3
/home/runner/work/_actions/codecov/codecov-action/v3/dist/codecov -n  -Q github-action-3.1.0 -s ./build/coverage -v
[2022-06-06T14:06:13.985Z] ['verbose'] Start of uploader: 1654524373985...
[2022-06-06T14:06:13.986Z] ['info'] 
     _____          _
    / ____|        | |
   | |     ___   __| | ___  ___ _____   __
   | |    / _ \ / _` |/ _ \/ __/ _ \ \ / /
   | |___| (_) | (_| |  __/ (_| (_) \ V /
    \_____\___/ \__,_|\___|\___\___/ \_/
  Codecov report uploader 0.2.3
[2022-06-06T14:06:13.993Z] ['info'] => Project root located at: /home/runner/work/framework/framework
[2022-06-06T14:06:13.994Z] ['info'] -> No token specified or token is empty
[2022-06-06T14:06:13.994Z] ['verbose'] Start of network processing...
[2022-06-06T14:06:13.994Z] ['verbose'] Searching for files in /home/runner/work/framework/framework
[2022-06-06T14:06:14.001Z] ['verbose'] coveragepy is not installed
[2022-06-06T14:06:14.001Z] ['info'] Searching for coverage files...
[2022-06-06T14:06:14.111Z] ['info'] Warning: Some files located via search were excluded from upload.
[2022-06-06T14:06:14.112Z] ['info'] If Codecov did not locate your files, please review https://docs.codecov.com/docs/supported-report-formats
[2022-06-06T14:06:14.112Z] ['verbose'] Preparing to clean the following coverage paths: clover.xml,cobertura.xml
[2022-06-06T14:06:14.112Z] ['info'] => Found 2 possible coverage files:
  clover.xml
  cobertura.xml
[2022-06-06T14:06:14.112Z] ['verbose'] End of network processing
[2022-06-06T14:06:14.112Z] ['info'] Processing build/coverage/clover.xml...
[2022-06-06T14:06:14.114Z] ['info'] Processing build/coverage/cobertura.xml...
[2022-06-06T14:06:14.124Z] ['info'] Detected GitHub Actions as the CI provider.
[2022-06-06T14:06:14.124Z] ['verbose'] -> Using the following env variables:
[2022-06-06T14:06:14.124Z] ['verbose']      GITHUB_ACTION: __codecov_codecov-action
[2022-06-06T14:06:14.124Z] ['verbose']      GITHUB_HEAD_REF: 
[2022-06-06T14:06:14.124Z] ['verbose']      GITHUB_REF: refs/heads/master
[2022-06-06T14:06:14.124Z] ['verbose']      GITHUB_REPOSITORY: hydephp/framework
[2022-06-06T14:06:14.124Z] ['verbose']      GITHUB_RUN_ID: 2448215099
[2022-06-06T14:06:14.124Z] ['verbose']      GITHUB_SERVER_URL: https://github.com
[2022-06-06T14:06:14.124Z] ['verbose']      GITHUB_SHA: 0b5a1c0010f0a8b2e5a2c853f5c3a3a22631c51d
[2022-06-06T14:06:14.124Z] ['verbose']      GITHUB_WORKFLOW: Test Suite (Matrix)
[2022-06-06T14:06:14.125Z] ['verbose'] Using the following upload parameters:
[2022-06-06T14:06:14.125Z] ['verbose'] branch
[2022-06-06T14:06:14.125Z] ['verbose'] build
[2022-06-06T14:06:14.125Z] ['verbose'] buildURL
[2022-06-06T14:06:14.125Z] ['verbose'] commit
[2022-06-06T14:06:14.125Z] ['verbose'] job
[2022-06-06T14:06:14.125Z] ['verbose'] pr
[2022-06-06T14:06:14.125Z] ['verbose'] service
[2022-06-06T14:06:14.126Z] ['verbose'] slug
[2022-06-06T14:06:14.126Z] ['verbose'] name
[2022-06-06T14:06:14.126Z] ['verbose'] tag
[2022-06-06T14:06:14.126Z] ['verbose'] flags
[2022-06-06T14:06:14.126Z] ['verbose'] parent
[2022-06-06T14:06:14.127Z] ['info'] Pinging Codecov: https://codecov.io/upload/v4?package=github-action-3.1.0-uploader-0.2.3&token=*******&branch=master&build=2448215099&build_url=https%3A%2F%2Fgithub.com%2Fhydephp%2Fframework%2Factions%2Fruns%2F2448215099&commit=0b5a1c0010f0a8b2e5a2c853f5c3a3a22631c51d&job=Test+Suite+%28Matrix%29&pr=&service=github-actions&slug=hydephp%2Fframework&name=&tag=&flags=&parent=
[2022-06-06T14:06:14.132Z] ['verbose'] Passed token was 0 characters long
[2022-06-06T14:06:14.132Z] ['verbose'] https://codecov.io/upload/v4?package=github-action-3.1.0-uploader-0.2.3&branch=master&build=2448215099&build_url=https%3A%2F%2Fgithub.com%2Fhydephp%2Fframework%2Factions%2Fruns%2F2448215099&commit=0b5a1c0010f0a8b2e5a2c853f5c3a3a22631c51d&job=Test+Suite+%28Matrix%29&pr=&service=github-actions&slug=hydephp%2Fframework&name=&tag=&flags=&parent=
        Content-Type: 'text/plain'
        Content-Encoding: 'gzip'
        X-Reduced-Redundancy: 'false'
[2022-06-06T14:06:14.699Z] ['info'] https://codecov.io/github/hydephp/framework/commit/0b5a1c0010f0a8b2e5a2c853f5c3a3a22631c51d
https://storage.googleapis.com/codecov/v4/raw/2022-06-06/2B41805228C8FC3CF077669EBC9F8CF4/0b5a1c0010f0a8b2e5a2c853f5c3a3a22631c51d/f6698155-9a7d-49ed-91f6-a6a5f2278232.txt?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=GOOG1EKKHVKCKHW7KBCGM7IHR55T63V2PAVJWLVFNITJHDU5G6R5IRN3LMWJA%2F20220606%2FUS%2Fs3%2Faws4_request&X-Amz-Date=20220606T140614Z&X-Amz-Expires=10&X-Amz-SignedHeaders=host&X-Amz-Signature=69e26f9d4f23fa5110af366b67f44796978561a528eb6f6c11708e1db59b6467
[2022-06-06T14:06:14.699Z] ['verbose'] Returned upload url: https://storage.googleapis.com/codecov/v4/raw/2022-06-06/2B41805228C8FC3CF077669EBC9F8CF4/0b5a1c0010f0a8b2e5a2c853f5c3a3a22631c51d/f6698155-9a7d-49ed-91f6-a6a5f2278232.txt?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=GOOG1EKKHVKCKHW7KBCGM7IHR55T63V2PAVJWLVFNITJHDU5G6R5IRN3LMWJA%2F20220606%2FUS%2Fs3%2Faws4_request&X-Amz-Date=20220606T140614Z&X-Amz-Expires=10&X-Amz-SignedHeaders=host&X-Amz-Signature=69e26f9d4f23fa5110af366b67f44796978561a528eb6f6c11708e1db59b6467
[2022-06-06T14:06:14.699Z] ['info'] Uploading...
[2022-06-06T14:06:14.917Z] ['info'] {"status":"success","resultURL":"https://codecov.io/github/hydephp/framework/commit/0b5a1c0010f0a8b2e5a2c853f5c3a3a22631c51d"}
[2022-06-06T14:06:14.917Z] ['verbose'] End of uploader: 932 milliseconds

1. Output when running locally

This is me uploading the same report generated in the CI output above (also running verbose)
Command I ran:

.\codecov.exe --verbose -t <redacted> -s ./build/coverage -r hydephp/framework -C 0b5a1c0010f0a8b2e5a2c853f5c3a3a22631c51d
[2022-06-06T14:19:35.817Z] ['verbose'] Start of uploader: 1654525175817...
[2022-06-06T14:19:35.819Z] ['info']
     _____          _
    / ____|        | |
   | |     ___   __| | ___  ___ _____   __
   | |    / _ \ / _` |/ _ \/ __/ _ \ \ / /
   | |___| (_) | (_| |  __/ (_| (_) \ V /
    \_____\___/ \__,_|\___|\___\___/ \_/

  Codecov report uploader 0.2.3
[2022-06-06T14:19:35.873Z] ['info'] => Project root located at: H:/HydeTestRunner
[2022-06-06T14:19:35.874Z] ['info'] ->  Token found by arguments
[2022-06-06T14:19:35.875Z] ['verbose'] Start of network processing...
[2022-06-06T14:19:35.875Z] ['verbose'] Searching for files in H:/HydeTestRunner
[2022-06-06T14:19:35.932Z] ['verbose'] coveragepy is not installed
[2022-06-06T14:19:35.932Z] ['info'] Searching for coverage files...
[2022-06-06T14:19:36.013Z] ['info'] Warning: Some files located via search were excluded from upload.
[2022-06-06T14:19:36.013Z] ['info'] If Codecov did not locate your files, please review https://docs.codecov.com/docs/supported-report-formats
[2022-06-06T14:19:36.013Z] ['verbose'] Preparing to clean the following coverage paths: clover.xml,cobertura.xml
[2022-06-06T14:19:36.014Z] ['info'] => Found 2 possible coverage files:
  clover.xml
  cobertura.xml
[2022-06-06T14:19:36.014Z] ['verbose'] End of network processing
[2022-06-06T14:19:36.014Z] ['info'] Processing build/coverage/clover.xml...
[2022-06-06T14:19:36.016Z] ['info'] Processing build/coverage/cobertura.xml...
[2022-06-06T14:19:36.025Z] ['info'] Using manual override from args.
[2022-06-06T14:19:36.076Z] ['info'] Detected Local as the CI provider.
[2022-06-06T14:19:36.076Z] ['verbose'] -> Using the following env variables:
[2022-06-06T14:19:36.076Z] ['verbose']      BRANCH_NAME: undefined
[2022-06-06T14:19:36.076Z] ['verbose']      CI: undefined
[2022-06-06T14:19:36.076Z] ['verbose']      GIT_BRANCH: undefined
[2022-06-06T14:19:36.077Z] ['verbose']      GIT_COMMIT: undefined
[2022-06-06T14:19:36.127Z] ['verbose'] Using the following upload parameters:
[2022-06-06T14:19:36.128Z] ['verbose'] branch
[2022-06-06T14:19:36.128Z] ['verbose'] build
[2022-06-06T14:19:36.128Z] ['verbose'] buildURL
[2022-06-06T14:19:36.128Z] ['verbose'] commit
[2022-06-06T14:19:36.128Z] ['verbose'] job
[2022-06-06T14:19:36.128Z] ['verbose'] pr
[2022-06-06T14:19:36.128Z] ['verbose'] service
[2022-06-06T14:19:36.128Z] ['verbose'] slug
[2022-06-06T14:19:36.128Z] ['verbose'] name
[2022-06-06T14:19:36.128Z] ['verbose'] tag
[2022-06-06T14:19:36.128Z] ['verbose'] flags
[2022-06-06T14:19:36.128Z] ['verbose'] parent
[2022-06-06T14:19:36.130Z] ['info'] Pinging Codecov: https://codecov.io/upload/v4?package=uploader-0.2.3&token=*******&branch=master&build=&build_url=&commit=0b5a1c0010f0a8b2e5a2c853f5c3a3a22631c51d&job=&pr=&service=&slug=hydephp%2Fframework&name=&tag=&flags=&parent=
[2022-06-06T14:19:36.130Z] ['verbose'] Passed token was 36 characters long
[2022-06-06T14:19:36.130Z] ['verbose'] https://codecov.io/upload/v4?package=uploader-0.2.3&branch=master&build=&build_url=&commit=0b5a1c0010f0a8b2e5a2c853f5c3a3a22631c51d&job=&pr=&service=&slug=hydephp%2Fframework&name=&tag=&flags=&parent=
        Content-Type: 'text/plain'
        Content-Encoding: 'gzip'
        X-Reduced-Redundancy: 'false'
[2022-06-06T14:19:36.573Z] ['info'] https://codecov.io/github/hydephp/framework/commit/0b5a1c0010f0a8b2e5a2c853f5c3a3a22631c51d
https://storage.googleapis.com/codecov/v4/raw/2022-06-06/2B41805228C8FC3CF077669EBC9F8CF4/0b5a1c0010f0a8b2e5a2c853f5c3a3a22631c51d/6319c5ee-573b-45b7-80f8-a3650012fabc.txt?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=GOOG1EKKHVKCKHW7KBCGM7IHR55T63V2PAVJWLVFNITJHDU5G6R5IRN3LMWJA%2F20220606%2FUS%2Fs3%2Faws4_request&X-Amz-Date=20220606T141935Z&X-Amz-Expires=10&X-Amz-SignedHeaders=host&X-Amz-Signature=110199cedf1d00d301473145bd5002d21fb03f73670a0f682ec0a5b1b4a498de
[2022-06-06T14:19:36.574Z] ['verbose'] Returned upload url: https://storage.googleapis.com/codecov/v4/raw/2022-06-06/2B41805228C8FC3CF077669EBC9F8CF4/0b5a1c0010f0a8b2e5a2c853f5c3a3a22631c51d/6319c5ee-573b-45b7-80f8-a3650012fabc.txt?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=GOOG1EKKHVKCKHW7KBCGM7IHR55T63V2PAVJWLVFNITJHDU5G6R5IRN3LMWJA%2F20220606%2FUS%2Fs3%2Faws4_request&X-Amz-Date=20220606T141935Z&X-Amz-Expires=10&X-Amz-SignedHeaders=host&X-Amz-Signature=110199cedf1d00d301473145bd5002d21fb03f73670a0f682ec0a5b1b4a498de
[2022-06-06T14:19:36.574Z] ['info'] Uploading...
[2022-06-06T14:19:36.961Z] ['info'] {"status":"success","resultURL":"https://codecov.io/github/hydephp/framework/commit/0b5a1c0010f0a8b2e5a2c853f5c3a3a22631c51d"}
[2022-06-06T14:19:36.961Z] ['verbose'] End of uploader: 1144 milliseconds

2. Yes, as you can see there is a resultURL

I assume this is the URL you mean. As you can see, the coverage works as expected (after about 20 minutes of processing…).

@hydephp sorry it took me a bit longer to get back to this. I noticed that you have since removed Codecov. I made a small PR, but not sure if it works given that the Actions aren’t running. Let me know if you’d like to continue.

Hey Tom! I approved the workflow, gonna try to help you to debug this.

Resolved via feat: add back Codecov with all files by thomasrockhu-codecov · Pull Request #558 · hydephp/framework · GitHub