Skip to content

Commit

Permalink
Write coverage infomation to step summary instead of to a comment
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon Beal committed May 17, 2024
1 parent 75bfcc9 commit 62384ee
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions .github/workflows/unit-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

0 comments on commit 62384ee

Please sign in to comment.