Skip to content

Commit 36ba2bc

Browse files
authored
Merge pull request #24 from leandromoreira/patch-1
Add test coverage reporting to Go workflow
2 parents ce9a93b + c5d0d1b commit 36ba2bc

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

.github/workflows/go.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ jobs:
1515
runs-on: ubuntu-latest
1616
steps:
1717
- uses: actions/checkout@v4
18+
- uses: actions/setup-go@v4
19+
with:
20+
go-version-file: 'go.mod'
1821

1922
- name: Set up Go
2023
uses: actions/setup-go@v4
@@ -24,5 +27,11 @@ jobs:
2427
- name: Build
2528
run: go build -v ./...
2629

27-
- name: Test
28-
run: go test -v ./...
30+
- name: Test and coverage
31+
run: go test -v ./... -coverprofile=coverage.out -covermode=atomic
32+
33+
- name: Upload coverage artifact
34+
uses: actions/upload-artifact@v4
35+
with:
36+
name: coverage-report
37+
path: coverage.out

0 commit comments

Comments
 (0)