Skip to content

Commit

Permalink
use codecov
Browse files Browse the repository at this point in the history
  • Loading branch information
zrr1999 committed Dec 29, 2023
1 parent 47aab83 commit 8b2c138
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
7 changes: 7 additions & 0 deletions .github/codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
coverage:
status:
project:
default:
target: 100%
threshold: 0%
if_ci_failed: error
13 changes: 4 additions & 9 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,7 @@ jobs:
run: |
pdm run cov --title "Coverage for ${{ github.sha }}"
- name: Store coverage HTML
run: smokeshow upload htmlcov
env:
SMOKESHOW_GITHUB_STATUS_DESCRIPTION: Coverage {coverage-percentage}
SMOKESHOW_GITHUB_COVERAGE_THRESHOLD: 50
SMOKESHOW_GITHUB_CONTEXT: coverage
SMOKESHOW_GITHUB_TOKEN: ${{ secrets.MY_GITHUB_TOKEN }}
SMOKESHOW_GITHUB_PR_HEAD_SHA: ${{ github.sha }}
SMOKESHOW_AUTH_KEY: ${{ secrets.SMOKESHOW_AUTH_KEY }}
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ test = [
"coverage",
]
[tool.pdm.scripts]
cov ={ composite = ["pytest --cov=pyfuture --cov-context=test --xdoc ./tests ./pyfuture ", "coverage html --show-contexts {args}"]}
cov ={ composite = ["pytest --cov=pyfuture --xdoc ./tests ./pyfuture ", "coverage xml"]}

[tool.pdm.version]
source = "scm"
Expand Down

0 comments on commit 8b2c138

Please sign in to comment.