Skip to content

Commit

Permalink
ci: only report coverage when running on origin repo
Browse files Browse the repository at this point in the history
  • Loading branch information
hgiasac committed Jun 28, 2024
1 parent 132b131 commit 0f8e230
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,13 @@ jobs:
- name: Run Go unit tests
run: go test -v -race -timeout 3m -coverprofile=coverage.out ./...
- name: Go coverage format
if: ${{ github.event_name == 'pull_request' }}
if: ${{ github.event_name == 'pull_request' && github.repository == 'hasura/go-graphql-client' }}
run: |
go get github.com/boumenot/gocover-cobertura
go install github.com/boumenot/gocover-cobertura
gocover-cobertura < coverage.out > coverage.xml
- name: Code Coverage Summary Report
if: ${{ github.event_name == 'pull_request' }}
if: ${{ github.event_name == 'pull_request' && github.repository == 'hasura/go-graphql-client' }}
uses: irongut/[email protected]
with:
filename: coverage.xml
Expand All @@ -83,7 +83,7 @@ jobs:
thresholds: "60 80"
- name: Add Coverage PR Comment
uses: marocchino/sticky-pull-request-comment@v2
if: ${{ github.event_name == 'pull_request' }}
if: ${{ github.event_name == 'pull_request' && github.repository == 'hasura/go-graphql-client' }}
with:
path: code-coverage-results.md
- name: Dump docker logs on failure
Expand Down

0 comments on commit 0f8e230

Please sign in to comment.