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

chore: don't fail the build for having less than 100 percent coverage #32

Merged
merged 3 commits into from
Feb 20, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,7 @@ jobs:
uses: orgoro/coverage@v3.1
with:
coverageFile: coverage.xml
thresholdAll: 0.8
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ha, is not having this line what was producing the Threshold number being 0% on other PRs?

Overall Coverage

Lines Covered Coverage Threshold Status
353 304 86% 0% 🟢

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah maybe so? Turns out it wasn't what was failing the build

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why doesn't github have 🙃 in the quick reactions???

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make cov-xml passes/fails the build based on .coverage settings. This action is set to run if: always() to capture the report in the GitHub Pull Request overview. They should match, I'm surprised the integration isn't tighter.

thresholdNew: 0.9
thresholdModified: 0.9
token: ${{ secrets.GITHUB_TOKEN }}
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ clean:
rm -rf .coverage .mypy_cache .pytest_cache .ruff_cache *.egg-info build dist htmlcov

cov:
$(PYTHON) -m coverage report
$(PYTHON) -m coverage report --fail-under=80
Copy link
Collaborator

@tdstein tdstein Feb 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm going to move this to .coveragerc.


cov-html:
$(PYTHON) -m coverage html
$(PYTHON) -m coverage html --fail-under=80

cov-xml:
$(PYTHON) -m coverage xml
$(PYTHON) -m coverage xml --fail-under=80

deps:
$(PIP) install -r requirements.txt -r requirements-dev.txt
Expand Down
Loading