You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- name: Report test coverage to codecovuses: codecov/codecov-action@v4with:
fail_ci_if_error: truefiles: ./coverage/coverage.xmltoken: ${{ secrets.CODECOV_TOKEN }}verbose: truecodecov_yml_path: ./.config/codecov.yml
Note that we're using codecov_yml_path to refer to a custom location of the codecov.yml file inside a .config/ folder. The file is recognized as can be seen in the last GitHub Actions run here:
debug - 2024-06-01 14:01:52,870 -- Loading config from .config/codecov.yml
Inside the .config/codecov.yml file, we specify that the spec/ folder should be ignored entirely by codecov as we don't want our test files themselves to contribute to the coverage statistics.
# Ignore test files themselves in the Codecov report# see: https://about.codecov.io/blog/should-i-include-test-files-in-code-coverage-calculations/ignore:
- "../spec/**/*"
- "**/*_spec.rb"
However, in the codecov dashboard, we still see the spec/ folder and all of its contents in the code tree.
Some questions
From the "Ignoring paths" documentation page, it's not clear whether we should use ../spec/**/* or ./spec/**/* when a custom location for the codecov.yml file is set up. Both variants don't seem to work for us. Maybe it's something obvious that I can't see?
Should the file coverage.xml only contain results that are not ignored by Codecov? Or is Codecov smart enough to filter this according to the ignore key in the codecov.yml file?
The text was updated successfully, but these errors were encountered:
Splines
changed the title
Ignore paths does not ignore path with custom Codecov config file location
Ignore paths not working with custom Codecov config file location
Jun 1, 2024
Splines
changed the title
Ignore paths not working with custom Codecov config file location
"Ignore paths" not working with custom Codecov config file location
Jun 2, 2024
With these lines in our GitHub actions workflow, we report our test coverage to codecov.
Note that we're using
codecov_yml_path
to refer to a custom location of thecodecov.yml
file inside a.config/
folder. The file is recognized as can be seen in the last GitHub Actions run here:Inside the
.config/codecov.yml
file, we specify that thespec/
folder should be ignored entirely by codecov as we don't want our test files themselves to contribute to the coverage statistics.However, in the codecov dashboard, we still see the
spec/
folder and all of its contents in the code tree.Some questions
../spec/**/*
or./spec/**/*
when a custom location for thecodecov.yml
file is set up. Both variants don't seem to work for us. Maybe it's something obvious that I can't see?coverage.xml
only contain results that are not ignored by Codecov? Or is Codecov smart enough to filter this according to theignore
key in thecodecov.yml
file?The text was updated successfully, but these errors were encountered: