From e37a1e7e84f07f77e0aab7e7f31b69be7b77a8ed Mon Sep 17 00:00:00 2001 From: James Clarke <139879523+jclarkeSTFC@users.noreply.github.com> Date: Mon, 23 Sep 2024 12:43:09 +0100 Subject: [PATCH] Update run_tests.yml --- .github/workflows/run_tests.yml | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index e08a9f0..679f8ec 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -14,4 +14,25 @@ jobs: - name: Check python version run: python --version - name: Run tests - run: python -m pytest tests + run: python -m pytest tests --junit-xml=test-results.xml + - name: Surface failing tests + if: always() + uses: pmeier/pytest-results-action@main + with: + # A list of JUnit XML files, directories containing the former, and wildcard + # patterns to process. + # See @actions/glob for supported patterns. + path: test-results.xml + + # (Optional) Add a summary of the results at the top of the report + summary: true + + # (Optional) Select which results should be included in the report. + # Follows the same syntax as `pytest -r` + display-options: fEX + + # (Optional) Fail the workflow if no JUnit XML was found. + fail-on-empty: true + + # (Optional) Title of the test results section in the workflow summary + title: Test results