Skip to content

Commit

Permalink
Merge pull request #5 from mimre25/add-codecov
Browse files Browse the repository at this point in the history
ci: Add codecov
  • Loading branch information
mimre25 authored Aug 21, 2023
2 parents 82a5947 + 4e3b157 commit 90b6cae
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 6 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/tox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,8 @@ jobs:
run: pip install tox
- name: Test with tox
run: tox -e py${{matrix.python-version}}
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
files: coverage.xml
7 changes: 7 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
coverage:
status:
project:
default:
target: 100%
threshold: 1%
11 changes: 5 additions & 6 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tox]
skip_missing_interpreters = {env:TOX_SKIP_MISSING_INTERPRETERS:True}
envlist = py{37,38,39,310,311},lint
envlist = py{3.7,3.8,3.9,3.10,3.11},lint
isolated_build = True

[testenv]
Expand All @@ -11,17 +11,16 @@ deps =
freezegun
commands =
coverage run -m pytest {posargs}
coverage report

[testenv:py{39,310,311}]
[testenv:py{3.9,3.10,3.11}]
commands =
{[testenv]commands}
coverage report --fail-under 100
coverage xml

[testenv:py{37,38}]
[testenv:py{3.7,3.8}]
commands =
{[testenv]commands}
coverage report --fail-under 80
coverage xml

[testenv:ruff]
skip_install = true
Expand Down

0 comments on commit 90b6cae

Please sign in to comment.