Description
I have been trying to get a file ignored using the .yml config. It seems to be matching all of the support docs and other answers on this site, but the file continues to be included in code coverage evaluation.
Repository
Private repo
Versions
macOS 10.15, Safari 13.0, Codecov 1.1.6
Additional Information
Recent commit 69276a4e16162263e1ec0711ea5b6f59d7e10c00
1 Like
@drazisil In case you’re the one that would investigate this as well, could you take a look and see if there is anything I could do to get this to work properly? Thanks!
Yep, thanks for the ping. I’ll check the logs tomorrow, could you post or attach the codecov.yml here?
There’s almost a 100% chance something is invalid, my apologies in advance as the validate endpoint is lax, its getting fixed asap.
Thanks!
coverage:
status:
project:
default: false # disable the default status that measures entire project
unitTests:
target: auto
paths: "culture-cloud-iosTests/"
app:
target: auto
paths: "culture-cloud-ios/"
ignore:
- "culture-cloud-iosTests/Matchers.swift"
I’ve also tried - Matchers.swift
for the ignore line, but neither has seemed to work.
Humor me and try changing the paths to a map, please?
Path:
- "something"
Edit: I should ask, are you getting the two statuses you expect?
Yes, I am. But the file Matchers.swift
continues to be included in the coverage report.
In that case I’ll probably need to check the logs. I’d be interested if changing the above helps though.
Just to confirm, you’d like me to change the ignore section to:
ignore:
- "Matchers.swift"
Is that correct?
No, the paths under your statuses. I know it seems it’s not related, but right now there are likely two separate processes reading that file and if any part is “bad” it will ignore the whole thing.
Ok, last sanity check. This should be the new file:
coverage:
status:
project:
default: false # disable the default status that measures entire project
unitTests:
target: auto
paths:
- "culture-cloud-iosTests"
app:
target: auto
paths:
- "culture-cloud-ios"
ignore:
- "culture-cloud-iosTests/Matchers.swift"
I edited it.
Sorry I’m not doing well at explaining, hope that helps.
Definitely helped. I’ve updated the file, and it’s running through CI now.
Commit hash is afdf23f3e51a76bc870a000b34c655132ddc5a95
.
Cool. If that doesn’t work I’ll check the logs tomorrow to see what’s wrong and report back.
1 Like
Boom! It worked. One of the diff changes shown for the PR is that the Matchers
file is now removed. Thanks!
1 Like
Awesome! Thanks for sticking with me, troubleshooting on mobile is a pain
1 Like
Just in summary, in case someone else finds this issue, the key was to adjust the codecov.yml
file from this:
coverage:
status:
project:
default: false # disable the default status that measures entire project
unitTests:
target: auto
paths: "culture-cloud-iosTests/"
app:
target: auto
paths: "culture-cloud-ios/"
to instead be this:
coverage:
status:
project:
default: false # disable the default status that measures entire project
unitTests:
target: auto
paths:
- "culture-cloud-iosTests"
app:
target: auto
paths:
- "culture-cloud-ios"
Without any other changes, the ignore
section started working properly.
1 Like