Skip to content

Run test script with/without coverage #486

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

Merged
merged 2 commits into from
Jun 29, 2021

Conversation

duckontheweb
Copy link
Contributor

@duckontheweb duckontheweb commented Jun 29, 2021

Related Issue(s): #

Description:

Adds ability to run scripts/test with or without coverage (default outside of CI is still to run with coverage).

Also moves generation of coverage.xml out of scripts/test. The XML file is mostly used when uploading coverage to Codecov.io. Generating this file would cause all test jobs in the matrix to fail if the coverage dropped, which is misleading. Instead, this PR updates the coverage CI job to first upload the coverage report to Codecov.io so we can use it for debugging, then generates the report again using the configured fail-under value, which will cause coverage job to fail if coverage drops. This should make the source of the workflow failure a bit more obvious to developers.

PR Checklist:

  • Code is formatted (run pre-commit run --all-files)
  • Tests pass (run scripts/test)
  • Documentation has been updated to reflect changes, if applicable
  • This PR maintains or improves overall codebase code coverage.
  • Changes are added to the CHANGELOG. See the docs for information about adding to the changelog.

@duckontheweb duckontheweb requested a review from lossyrob June 29, 2021 01:50
@duckontheweb
Copy link
Contributor Author

cc: @l0b0

@codecov-commenter
Copy link

codecov-commenter commented Jun 29, 2021

Codecov Report

Merging #486 (0eaef55) into main (f9573f8) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #486   +/-   ##
=======================================
  Coverage   91.66%   91.66%           
=======================================
  Files          40       40           
  Lines        5245     5245           
=======================================
  Hits         4808     4808           
  Misses        437      437           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f9573f8...0eaef55. Read the comment docs.

@duckontheweb duckontheweb merged commit 1415f95 into stac-utils:main Jun 29, 2021
@duckontheweb duckontheweb deleted the change/coverage-ci branch June 29, 2021 17:43
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.

3 participants