From 5167f231c2ea08c3cbf3a0d22d6777f675319e93 Mon Sep 17 00:00:00 2001 From: Kirill Pushkarev Date: Wed, 1 Nov 2023 17:59:37 +0200 Subject: [PATCH] chore: add pytest summary report --- .github/workflows/test.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4225cb6..8ef5c69 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -45,3 +45,14 @@ jobs: title: Coverage Report pytest-coverage-path: ./pytest-coverage.txt junitxml-path: ./pytest.xml + # add content to GitHub summary + - name: Pytest coverage Github summary + if: ${{ success() && github.event_name == 'pull_request' }} + run: | + set -o pipefail + echo '# Coverage report :rocket:' >> $GITHUB_STEP_SUMMARY + echo '```' >> $GITHUB_STEP_SUMMARY + cat pytest-coverage.txt >> $GITHUB_STEP_SUMMARY + echo '```' >> $GITHUB_STEP_SUMMARY + echo '\n\n\n' + echo '${{ steps.coverageComment.outputs.coverageHtml }}' >> $GITHUB_STEP_SUMMARY