From 49062b9ec9b0fcf201a1b8f6b7f1855ba17ba0d3 Mon Sep 17 00:00:00 2001 From: Hugo Cachitas Date: Fri, 19 Apr 2024 00:30:25 +0100 Subject: [PATCH] ci: fix test results --- .github/workflows/ci.yml | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d9431aa..e4c5753 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,14 +35,34 @@ jobs: - name: Test with pytest run: | - pdm run -v test --junitxml=junit/test-results-${{ matrix.python-version }}.xml + pdm run -v test --junit-xml pytest.xml - name: Upload test results + if: always() uses: actions/upload-artifact@v4 with: name: pytest-results-${{ matrix.python-version }} - path: junit/test-results-${{ matrix.python-version }}.xml - if: ${{ always() }} + path: pytest.xml + + publish-test-results: + name: "Publish Tests Results" + runs-on: ubuntu-latest + needs: test + permissions: + checks: write + pull-requests: write + if: always() + steps: + - name: Download Artifacts + uses: actions/download-artifact@v4 + with: + path: artifacts + + - name: Publish test results + uses: EnricoMi/publish-unit-test-result-action@v2 + with: + files: "artifacts/**/*.xml" + release: name: Release new version