From 62384eea61c76d7c5302faa23d1038ce67591273 Mon Sep 17 00:00:00 2001 From: Simon Beal Date: Fri, 17 May 2024 16:30:34 +0100 Subject: [PATCH] Write coverage infomation to step summary instead of to a comment --- .github/workflows/unit-tests.yaml | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/.github/workflows/unit-tests.yaml b/.github/workflows/unit-tests.yaml index 46fff12..a51f668 100644 --- a/.github/workflows/unit-tests.yaml +++ b/.github/workflows/unit-tests.yaml @@ -14,6 +14,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.sha }} - name: Set up Go uses: actions/setup-go@v4 @@ -52,11 +54,6 @@ jobs: env: TOTAL_COVERAGE: ${{ steps.go-test-coverage.outputs.total-coverage }} ARTIFACT_URL: ${{ steps.uploaded-report.outputs.artifact-url }} - with: - script: | - github.rest.issues.createComment({ - issue_number: context.issue.number, - owner: context.repo.owner, - repo: context.repo.repo, - body: 'Total test coverage: ${{ env.TOTAL_COVERAGE }}%\n Download report: ${{ env.ARTIFACT_URL }}' - }) + run: | + echo "### Total test coverage: ${{ env.TOTAL_COVERAGE }}%" >> $GITHUB_STEP_SUMMARY + echo "Download report: ${{ env.ARTIFACT_URL }}" >> $GITHUB_STEP_SUMMARY