Skip to content

Commit

Permalink
👷 Run coverage only in CI/CD
Browse files Browse the repository at this point in the history
  • Loading branch information
spapanik committed Nov 23, 2024
1 parent 50eb4ff commit 497778b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,9 @@ jobs:
yam install -g main -g test
- name: Test the project
run: |
yam -e tests
yam -e tests --cov --junitxml=junit.xml -o junit_family=legacy
- name: Upload test results to Codecov
if: ${{ !cancelled() }}
uses: codecov/test-results-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
4 changes: 3 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ forced-separate = [
split-on-trailing-comma = false

[tool.pytest.ini_options]
addopts = "-ra -v --cov"
addopts = "-ra -v"
testpaths = "tests"

[tool.coverage.run]
Expand All @@ -195,6 +195,8 @@ data_file = ".cov_cache/coverage.dat"
exclude_also = [
"if TYPE_CHECKING:",
]
precision = 2
fail_under = 100
show_missing = true
skip_covered = true
skip_empty = true

0 comments on commit 497778b

Please sign in to comment.