Ignore paths not being picked up in PR

Description

I opened a PR that updates our repository codecov.yml file to added some ignore paths. Unfortunately the paths I’ve tried have not been picked up and are being included in the coverage report for that PR.

My codecov.yml file looks like this:

coverage:
  status:
    project:
      default:
        target: auto
        threshold: 0%
        base: auto
    patch:
      default:
        target: auto
        threshold: 0%
        base: auto
ignore:
  Pods
  MyProject/Source/Components/Logging/CrashlyticsDestination.swift
  MyProject/Source/Generated
  MyProject/Source/Utility/Simulation.swift
  MyProject/Source/UITesting
  MyProject/Source/Components/AppDelegate Services
  MyProject/Source/Wrappers

I’ve tried various ways of building the paths, including doing something like **/Wrapper for example. Unfortunately no matter what I try in the yml file works. However, if I tell Slather to ignore these files, it works fine. I’d like to leverage Codecov as much as possible for this so that I’m not maintain coverage in two separate places.

According to the docs, Codecov should be using the codecov.yml file in the branch, and not the master version. Short of this, I’m running out of ideas.

Also, if I specify the path in the project and patch sections, Pods is still included.

Any ideas?

Repository

Private

Hi @matcartmill-gd

Can you share a commit SHA so I can check the logs for errors?

Sure, @drazisil

f1db92bbd40fbb233e1c8d34fd1d7096c0ba7c80
428e7077cc6cc8e48f6df329660aa4ff1b676cdf
38eae4e2347d18ac41f904db1e6bf01edb87d195

I am having same issue, no ignores seem to be working.

Sorry for the delay here. Your ignore section is invalid. It should be

ignore:
  - "first"
  - "second"
  - etc

Can you confirm it matches that format please?

Please provide a recent commit SHA, @scott

Thanks @drazisi. Question:l Are the ignore paths relative to the “paths” listed in the “project” and “patch” section, or is it global from the root of the project / base where the codecov.yml file exists?

All paths anywhere in the codecov.yml would be relative to the git repo root, or, if used, the -R flag of the bash uploader.

b434c11ca6f7cd6409bb87a2c53df3c3c19fdbde

ignore:
  - "Pods"
  - "lib"
  - "fastlane"
  - "docs"
  - "**/*.generated.swift"

The **/*.generated.swift is not working. Even if I give a full path to a generated file it doesn’t work.

It looks like you are using branch under your pull comment. The correct key is branches

I have corrected the docs

That fixed it thanks! It said my yml was valid before. Is there another way to know that my yml is broken?

Our validate endpoint is a little…confused… right now. Once we finish deploying all the new things it relies on, we’ll get it fixed. Sorry it was incorrect.

For now, please trust the yaml reference in the docs.