Skip to content

Commit

Permalink
fix/coverage-report (#10)
Browse files Browse the repository at this point in the history
* fix(tests): 🔧 omit tests in coverage, cover all files

Do not show tests themselves in the coverage report. Show files that are not covered by tests at all.

Task: TECHART-340

* ci(tests): 📈 coverage html report

add folder with HTML coverage reports to the artifact

Task: TECHART-341
  • Loading branch information
Olaf-Wolf3D authored Dec 12, 2023
1 parent e7c8f60 commit 2300dcb
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,17 @@ jobs:
- name: Run tests
run: hatch run test:cov

- name: Upload performance profiling artifact
- name: Prepare artifact
run: |
mkdir artifact
cp -r tests/.profiles artifact/.profiles
cp -r tests/.coverage artifact/.coverage
- name: Upload performance & coverage report artifact
uses: actions/upload-artifact@v3
with:
name: performance-profiling
path: tests/.profiles
name: coverage-profiling
path: artifact
if-no-files-found: error

- name: Run linting
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ test-cov = "coverage run -m pytest {args:tests}"
cov-report = [
"- coverage combine",
"coverage report",
"coverage html -d ./tests/.coverage",
]
cov = [
"test-cov",
Expand Down Expand Up @@ -265,7 +266,7 @@ module = "pyinstrument.*"
ignore_missing_imports = true

[tool.coverage.run]
source_pkgs = ["readyplayerme", "tests"]
source_pkgs = ["readyplayerme", "readyplayerme.meshops"]
branch = true
parallel = true
omit = [
Expand All @@ -274,7 +275,6 @@ omit = [

[tool.coverage.paths]
coverage_debugging = ["src/readyplayerme", "*/meshops/src/readyplayerme"]
tests = ["tests", "*/meshops/tests"]

[tool.coverage.report]
include_namespace_packages = true
Expand Down

0 comments on commit 2300dcb

Please sign in to comment.