Skip to content

Commit

Permalink
Add cobertura coverage report to test
Browse files Browse the repository at this point in the history
  • Loading branch information
ypjama committed Oct 16, 2023
1 parent a0cd7af commit 81c5380
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,20 @@ jobs:
with:
go-version: '1.21.3'

- name: Install dependencies
run: |
go get .
go install github.com/t-yuki/gocover-cobertura@latest
- name: Build
run: CGO_ENABLED=0 go build -v -o conflictless cmd/conflictless/main.go

- name: Test
run: touch c.out && go test -v ./... -coverprofile=c.out && go tool cover -func=c.out
run: >-
touch c.out
&& go test -v ./... -coverprofile=c.out
&& go tool cover -func=c.out
&& gocover-cobertura < c.out > coverage.xml
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
Expand Down

0 comments on commit 81c5380

Please sign in to comment.