Skip to content

Commit

Permalink
feat: add coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
sergeii committed Aug 12, 2023
1 parent 9238546 commit 9f1ab03
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 12 deletions.
12 changes: 12 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
coverage:
range: 90..100
round: down
precision: 2

status:
project:
threshold: 0.1%
if_ci_failed: success
patch:
threshold: 0.1%
if_ci_failed: success
8 changes: 7 additions & 1 deletion .coveragerc
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
[run]
branch = True
omit =
src/apps/*/migrations/*
apps/*/migrations/*
tests/*
apps/*/translation.py

[report]
include =
apps/*
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
.DS_Store/
__pycache__/
.coverage
/htmlcov/
/.pytest_cache/
/.mypy_cache/
/.ruff_cache/
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,12 @@ jobs:
run: poetry install

- name: Run tests
run: poetry run pytest -v
run: poetry run pytest --assert=plain --cov=apps

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

black:
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*.py[cod]
.coverage.xml
.coverage
/htmlcov
/htmlcov/
__pycache__/
/celerybeat*
/.pytest_cache
Expand Down
10 changes: 5 additions & 5 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ factory-boy = "3.2.1"
pytest = "7.2.2"
pytest-django = "4.5.2"
pytest-localserver = "0.7.1"
pytest-cov = "4.0.0"
pytest-cov = "4.1.0"
pytest-repeat = "0.9.1"
mypy = "^1.2.0"
ruff = "^0.0.282"
black = "^23.7.0"
mypy = "1.2.0"
ruff = "0.0.282"
black = "23.7.0"

[build-system]
requires = ["poetry-core"]
Expand Down

0 comments on commit 9f1ab03

Please sign in to comment.