Make the coverage report touch all files

This commit is contained in:
Julian Stirling 2025-04-11 23:29:32 +01:00
parent 1c871749b0
commit 7665d45e09
6 changed files with 14 additions and 8 deletions

4
.coveragerc Normal file
View file

@ -0,0 +1,4 @@
[run]
concurrency = multiprocessing, thread
parallel = true
sigterm = true

1
.gitignore vendored
View file

@ -48,6 +48,7 @@ htmlcov/
.cache .cache
nosetests.xml nosetests.xml
coverage.xml coverage.xml
report.xml
pytest_report.xml pytest_report.xml
# Translations # Translations

View file

@ -104,11 +104,8 @@ pytest:
stage: testing stage: testing
extends: .python extends: .python
script: script:
- > - pytest
pytest --cov --cov-report term # --gitlab-code-quality-report=pytest-warnings.json # can restore when it installs ok
--cov-report xml:coverage.xml
--junitxml=report.xml
# --gitlab-code-quality-report=pytest-warnings.json # can restore when it installs ok
coverage: '/(?i)total.*? (100(?:\.0+)?\%|[1-9]?\d(?:\.\d+)?\%)$/' coverage: '/(?i)total.*? (100(?:\.0+)?\%|[1-9]?\d(?:\.\d+)?\%)$/'
artifacts: artifacts:
when: always when: always

View file

@ -73,8 +73,14 @@ target-version = "py311"
[tool.pytest.ini_options] [tool.pytest.ini_options]
addopts = [ addopts = [
"--import-mode=importlib", "--import-mode=importlib",
"--cov=openflexure_microscope_server",
"--cov-report=term",
"--cov-report=xml:coverage.xml",
"--junitxml=report.xml",
] ]
norecursedirs = [".git", "build", "node_modules"]
[tool.ruff.format] [tool.ruff.format]
# Use native line endings for all files # Use native line endings for all files
line-ending = "native" line-ending = "native"

View file

@ -1,2 +0,0 @@
[pytest]
norecursedirs = .git build node_modules