From 37f92e1eb3ab087786faf3e205f537c27ea82d56 Mon Sep 17 00:00:00 2001 From: Xevion Date: Sat, 9 Nov 2024 14:37:49 -0600 Subject: [PATCH] fix module target for coverage, add junit XML output, set pipefail to prevent exit code hiding --- .github/workflows/test.yaml | 3 ++- .gitignore | 4 +++- .vscode/settings.json | 5 ++++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 06e31d1..4869bc3 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -38,7 +38,8 @@ jobs: - name: Pytest run: | cd backend - poetry run pytest --color=yes --cov-report=term-missing:skip-covered --cov=app tests/ | tee pytest-coverage.txt + set -o pipefail # otherwise 'tee' will eat the exit code + poetry run pytest --color=yes --cov=linkpulse --cov-report=term-missing:skip-covered --junitxml=pytest.xml | tee pytest-coverage.txt - name: Pytest coverage comment id: coverageComment diff --git a/.gitignore b/.gitignore index 75f933a..00ccd3e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,6 @@ .env +pytest.xml +pytest-coverage.txt # Byte-compiled / optimized / DLL files __pycache__/ @@ -161,4 +163,4 @@ cython_debug/ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore # and can be added to the global gitignore or merged into this file. For a more nuclear # option (not recommended) you can uncomment the following to ignore the entire idea folder. -#.idea/ \ No newline at end of file +#.idea/ diff --git a/.vscode/settings.json b/.vscode/settings.json index 1774037..14f1520 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -15,5 +15,8 @@ "structlog", "timestamper" ], - "python.analysis.extraPaths": ["./backend/"] + "python.analysis.extraPaths": ["./backend/"], + "[github-actions-workflow]": { + "editor.formatOnSave": false + } }