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 20, 2024
1 parent fb75d19 commit ee1e979
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/unit-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,14 @@ name: Unit tests
on:
push:
branches: [ "main" ]
pull_request_target:
pull_request:
branches: [ "main" ]

jobs:
build:
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 @@ -46,7 +44,7 @@ jobs:
path: cover.html

- name: Comment test coverage
if: ${{ github.event_name == 'pull_request_target' }}
if: ${{ github.event_name == 'pull_request' }}
uses: actions/github-script@v7
env:
TOTAL_COVERAGE: ${{ steps.go-test-coverage.outputs.total-coverage }}
Expand Down

0 comments on commit ee1e979

Please sign in to comment.