Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CI] Fix codecov config #3053

Merged
merged 1 commit into from
Jan 29, 2022
Merged

[CI] Fix codecov config #3053

merged 1 commit into from
Jan 29, 2022

Conversation

abravalheri
Copy link
Contributor

Motivation

The previous .codecov.yml file had an invalid configuration:

$ curl --data-binary @.codecov.yml https://codecov.io/validate
Error at ['coverage', 'status', 'project', 'threshold']:
must be of ['dict', 'boolean'] type

Summary of changes

According to the documentation, coverage.status.project does not seem to accept configuration parameters directly. Instead it requires a mapping between project names (or "default" when all the projects are targeted) and the configuration parameters.

This change fixes that by introducing a new nesting level with the default key between project and default. This passes the validation:

% curl --data-binary @.codecov.yml https://codecov.io/validate
Valid!

{
  "comment": false,
  "coverage": {
    "status": {
      "project": {
        "default": {
          "threshold": 0.5
        }
      }
    }
  }
}

Closes

Pull Request Checklist

The previous `.codecov.yml` file had an invalid configuration:

```bash
$ curl --data-binary @.codecov.yml https://codecov.io/validate
Error at ['coverage', 'status', 'project', 'threshold']:
must be of ['dict', 'boolean'] type
```

According to the
[documentation](https://docs.codecov.com/docs/commit-status#section-project-status),
`coverage.status.project` does not seem to accept configuration
parameters directly. Instead it requires a mapping between project
names (or `"default"` when all the projects are target) and the
configuration parameters.

This change fixes that by introducing a new nesting level with the
`default` key between `project` and `default`. This passes the validation:

```bash
% curl --data-binary @.codecov.yml https://codecov.io/validate
Valid!

{
  "comment": false,
  "coverage": {
    "status": {
      "project": {
        "default": {
          "threshold": 0.5
        }
      }
    }
  }
}
```
@jaraco jaraco merged commit 4156c0d into pypa:main Jan 29, 2022
@abravalheri abravalheri deleted the fix-codecov-config branch January 31, 2022 09:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants