Skip to content

Commit 23ce796

Browse files
authored
Merge pull request #160 from SmoFlaDru/dev-benno
Add code coverage CI steps
2 parents 64b38f6 + e93853d commit 23ce796

File tree

3 files changed

+63
-3
lines changed

3 files changed

+63
-3
lines changed

.github/workflows/django.yml

+7-2
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,15 @@ jobs:
3535
mv .env.test .env
3636
- name: Run Tests
3737
run: |
38-
uv run python manage.py test
38+
uv run coverage run manage.py test && uv run coverage xml
3939
- name: Report test results
4040
uses: actions/upload-artifact@v4
4141
if: success() || failure()
4242
with:
4343
name: test-results
44-
path: tests_result.xml
44+
path: tests_result.xml
45+
- name: Post coverage result
46+
uses: orgoro/[email protected]
47+
with:
48+
coverageFile: coverage.xml
49+
token: ${{ secrets.GITHUB_TOKEN }}

pyproject.toml

+5-1
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,18 @@ dependencies = [
2525
"redis>=5.2.1",
2626
]
2727

28-
2928
[tool.uv]
3029
dev-dependencies = [
3130
"unittest-xml-reporting ~=3.2",
3231
"testcontainers[postgres]>=4.9.0",
3332
"ruff>=0.9.7",
3433
"pre-commit>=4.1.0",
34+
"coverage>=7.6.12",
3535
]
3636

3737
[tool.setuptools]
3838
py-modules = []
39+
40+
[tool.coverage]
41+
run = { source = ["."], omit = ["*/.venv/*"] }
42+
report = { include_namespace_packages = true, show_missing = true}

uv.lock

+51
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)