Coverage information not restricted to a particular folder

Description

I edited my codecov.yml file “path” attribute to only include a specific folder i.e /src/store/reducers. The updated file is reflecting the change in GLOBAL.yml file on codecov dashboard as well and this is what it looks like:

{
“ignore”: [
“^cypress.",
"^public.
”,
“^.devcontainer.",
"^scripts.
”,
“(?s:[^\/]+\.config\.js.)\Z"
],
“codecov”: {
“bot”: “Simran”,
“notify”: {
“wait_for_ci”: false
},
“max_report_age”: false,
“require_ci_to_pass”: false
},
“comment”: {
“layout”: “reach, diff, flags, files”,
“behavior”: “default”,
“require_base”: false,
“require_head”: true,
“require_changes”: false
},
“coverage”: {
“status”: {
“project”: {
“default”: {
“paths”: [
"^src/store/reducers.

],
“target”: 80,
“threshold”: 1
}
}
}
}
}

CI/CD URL

Please provide a link to the CI/CD run.

Codecov Output

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

Uploading unit test coverage report to CodeCov
[2022-02-03T21:15:13.832Z] ['info'] 
     _____          _
    / ____|        | |
   | |     ___   __| | ___  ___ _____   __
   | |    / _ \ / _` |/ _ \/ __/ _ \ \ / /
   | |___| (_) | (_| |  __/ (_| (_) \ V /
    \_____\___/ \__,_|\___|\___\___/ \_/

  Codecov report uploader 0.1.15
[2022-02-03T21:15:13.840Z] ['info'] => Project root located at: /codebuild/output/src719430136/src/codestar-connections.us-west-2.amazonaws.com/git-http/936158790285/us-west-2/22f90b4d-cbcb-4696-9323-8dc94da0e001/vimnet/vlncc-frontend
[2022-02-03T21:15:13.842Z] ['info'] ->  Token found by arguments
[2022-02-03T21:15:13.854Z] ['info'] Searching for coverage files...
[2022-02-03T21:15:14.030Z] ['info'] Warning: Some files located via search were excluded from upload.
[2022-02-03T21:15:14.030Z] ['info'] If Codecov did not locate your files, please review https://docs.codecov.com/docs/supported-report-formats
[2022-02-03T21:15:14.030Z] ['info'] => Found 3 possible coverage files:
  coverage/clover.xml
  coverage/coverage-final.json
  coverage/lcov.info
[2022-02-03T21:15:14.030Z] ['info'] Processing /codebuild/output/src719430136/src/codestar-connections.us-west-2.amazonaws.com/git-http/936158790285/us-west-2/22f90b4d-cbcb-4696-9323-8dc94da0e001/vimnet/vlncc-frontend/coverage/clover.xml...
[2022-02-03T21:15:14.031Z] ['info'] Processing /codebuild/output/src719430136/src/codestar-connections.us-west-2.amazonaws.com/git-http/936158790285/us-west-2/22f90b4d-cbcb-4696-9323-8dc94da0e001/vimnet/vlncc-frontend/coverage/coverage-final.json...
[2022-02-03T21:15:14.032Z] ['info'] Processing /codebuild/output/src719430136/src/codestar-connections.us-west-2.amazonaws.com/git-http/936158790285/us-west-2/22f90b4d-cbcb-4696-9323-8dc94da0e001/vimnet/vlncc-frontend/coverage/lcov.info...
[2022-02-03T21:15:14.048Z] ['info'] Detected AWS CodeBuild as the CI provider.
[2022-02-03T21:15:14.049Z] ['info'] Pinging Codecov: https://codecov.io/upload/v4?package=uploader-0.1.15&token=*******&branch=&build=vaisala-vimps-vlncc-vlncc-frontend-develop-build%3A20dd75e3-9ccc-43e5-b546-a26421cb6418&build_url=&commit=eaa789a3f28f3d02363707f676221dd8e502a7b1&job=vaisala-vimps-vlncc-vlncc-frontend-develop-build%3A20dd75e3-9ccc-43e5-b546-a26421cb6418&pr=&service=codebuild&slug=&name=&tag=&flags=&parent=
[2022-02-03T21:15:14.445Z] ['info'] Uploading...
[2022-02-03T21:15:14.736Z] ['info'] {"status":"success","resultURL":"https://codecov.io/bitbucket/vimnet/vlncc-frontend/commit/eaa789a3f28f3d02363707f676221dd8e502a7b1"}
Done ........................!

Expected Results

The expected coverage to be calculated only based on the “reducers” folder

Actual Results

Additional Information

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

@s1mrankaur the paths you specified is only for the status check, and not propagated everywhere. Are you seeing the correct thing on that check?

If you ONLY want that folder to be involved, I think you would change the ignore section of the yaml

ignore:
  - ^(?!src\/store\/reducers).*
  

That worked. Thanks much @tom

1 Like