Skip to content

Commit

Permalink
update tasks file which generates xml cov report
Browse files Browse the repository at this point in the history
  • Loading branch information
elfkuzco committed Jun 12, 2024
1 parent 9ad9156 commit a650d75
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/backend-Tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,11 @@ jobs:
working-directory: backend
env:
POSTGRES_URI: postgresql+psycopg://postgres:postgres@localhost:5432/postgres
run: pytest --cov=./ --cov-report=xml
run: inv coverage --args "-vvv"

- name: Upload coverage report to codecov
uses: codecov/codecov-action@v3
with:
directory: backend
files: ./coverage.xml
working-directory: backend
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
1 change: 0 additions & 1 deletion backend/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ check = [
test = [
"pytest==8.0.0",
"coverage==7.4.1",
"pytest-cov==5.0.0",
]
dev = [
"pre-commit==3.6.0",
Expand Down
1 change: 1 addition & 0 deletions backend/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ def report_cov(ctx: Context, *, html: bool = False):
"""report coverage"""
ctx.run("coverage combine", warn=True, pty=use_pty)
ctx.run("coverage report --show-missing", pty=use_pty)
ctx.run("coverage xml", pty=use_pty)
if html:
ctx.run("coverage html", pty=use_pty)

Expand Down
1 change: 1 addition & 0 deletions worker/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ def report_cov(ctx: Context, *, html: bool = False):
"""report coverage"""
ctx.run("coverage combine", warn=True, pty=use_pty)
ctx.run("coverage report --show-missing", pty=use_pty)
ctx.run("coverage xml", pty=use_pty)
if html:
ctx.run("coverage html", pty=use_pty)

Expand Down

0 comments on commit a650d75

Please sign in to comment.