Generate and use pytest XML reports

This generates XML reports when we run pytest through poe, and
uploads them in the relevant CI stage.

I've also ignored mypy cache files - I'm not sure why this hasn't
been an issue before...
This commit is contained in:
Richard 2021-08-10 11:09:37 +01:00
parent 3e02fe4790
commit e33e92b43a
3 changed files with 10 additions and 1 deletions

4
.gitignore vendored
View file

@ -7,6 +7,9 @@
__pycache__/
*.py[cod]
# Mypy cache
.mypy_cache*
# C extensions
*.so
@ -45,6 +48,7 @@ htmlcov/
.cache
nosetests.xml
coverage.xml
pytest_report.xml
# Translations
*.mo

View file

@ -102,6 +102,11 @@ pytest:
- tags
- web
artifacts:
when: always
reports:
junit: pytest_report.xml
openapi:
stage: testing
image: python:3.7

View file

@ -44,7 +44,7 @@ black_check = "black --check ."
isort = "isort openflexure_microscope"
pylint = "pylint openflexure_microscope"
mypy = "mypy --cobertura-xml-report openflexure_microscope openflexure_microscope"
test = "pytest ."
test = "pytest . --junitxml=pytest_report.xml"
serve = "python -m openflexure_microscope.api.app"
format = ["black", "isort"]