Skip to content

Commit

Permalink
coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
domdinicola committed Dec 31, 2024
1 parent 336f9c6 commit 24330b0
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 40 deletions.
11 changes: 2 additions & 9 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,7 @@ jobs:
- name: Test
if: needs.changes.outputs.run_tests
run: |
uv run pytest tests --create-db --junit-xml junit-${{ matrix.python-version }}-${{matrix.django-version}}.xml
- name: Upload pytest test results
uses: actions/upload-artifact@v4
with:
name: pytest-results-${{ matrix.python-version }}-${{matrix.django-version}}
path: junit-${{ matrix.python-version }}-${{matrix.django-version}}.xml
if: ${{ always() }}
uv run pytest tests --cov-report=xml --cov-report xml:coverage.xml --junit-xml junit-${{ matrix.python-version }}-${{matrix.django-version}}.xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
Expand All @@ -108,5 +101,5 @@ jobs:
fail_ci_if_error: true
files: coverage.xml
token: ${{ secrets.CODECOV_TOKEN }}
verbose: false
verbose: true
name: codecov-${{env.GITHUB_REF_NAME}}
4 changes: 1 addition & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@ dependencies = [
"PyJWT",
"requests",
"social-auth-app-django",
"setuptools",
"wheel",
"pre-commit>=4.0.1",
]

[tool.uv]
Expand All @@ -49,6 +46,7 @@ dev-dependencies = [
"pytest-django",
"pytest-echo",
"pytest-factoryboy",
"pre-commit",
"requests-mock",
"responses",
"tox",
Expand Down
5 changes: 1 addition & 4 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,9 @@ addopts =
--tb=short
--capture=no
--reuse-db
--cov-report=html
--cov-report=term
--cov-config=tests/.coveragerc
--cov=unicef_security
--cov-report=html
--echo-version django
--echo-version unicef_security

Expand All @@ -44,7 +43,5 @@ commands =
pytest tests \
-q \
--create-db \
--cov-report=html \
--cov-report=term \
--cov-config={toxinidir}/tests/.coveragerc \
--cov=unicef_security
26 changes: 2 additions & 24 deletions uv.lock

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

0 comments on commit 24330b0

Please sign in to comment.