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

Fix threshold field in Codecov configuration and un-ignore modules #143

Merged
merged 2 commits into from
Oct 1, 2022

Conversation

mkniewallner
Copy link
Collaborator

@mkniewallner mkniewallner commented Sep 30, 2022

PR Checklist

  • A description of the changes is added to the description of this PR.
  • If there is a related issue, make sure it is linked to this PR.
  • If you've fixed a bug or added code that should be tested, add tests!
  • Documentation in docs is updated

Description of changes

Checking Codecov shows that the configuration is correctly invalid, as shown by https://app.codecov.io/gh/fpgmaas/deptry/commit/a701a5ae931d5d3f0dc59abc797b871b39009879.

Using the method described in https://docs.codecov.com/docs/codecov-yaml#validate-your-repository-yaml to validate the configuration:

$ curl -sSL --fail-with-body --data-binary @codecov.yaml https://codecov.io/validate
Error at ['coverage', 'status', 'project', 'default', 'threshold']: 
field 'threshold' cannot be coerced: 
curl: (22) The requested URL returned error: 400

With the change:

$ curl -sSL --fail-with-body --data-binary @codecov.yaml https://codecov.io/validate
Valid!

{
  "coverage": {
    "range": [
      70.0,
      100.0
    ],
    "round": "down",
    "precision": 1,
    "status": {
      "project": {
        "default": {
          "target": 90.0,
          "threshold": 0.5
        }
      }
    }
  }
}

Figured we could also un-ignore the modules currently ignored, since this will force us to add tests if coverage is not enough in those modules.

Also see #144 that suggests to add a CI workflow to ensure that the configuration is not broken on updates.

@fpgmaas fpgmaas merged commit a85c7ac into fpgmaas:main Oct 1, 2022
@mkniewallner mkniewallner deleted the fix-codecov-config branch October 1, 2022 11:51
fpgmaas pushed a commit that referenced this pull request Oct 2, 2022
…143)

* chore(codecov): fix `threshold` option
* chore(codecov): remove ignored paths
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