Skip to content

Commit 1635b29

Browse files
authored
Refactor Go CI workflow for coverage testing
Updated Go workflow to include coverage testing with goveralls.
1 parent a027a68 commit 1635b29

1 file changed

Lines changed: 26 additions & 0 deletions

File tree

.github/workflows/go.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Go
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout repository
14+
uses: actions/checkout@v4
15+
- name: Set up Go
16+
uses: actions/setup-go@v4
17+
with:
18+
go-version: '1.25'
19+
- name: Set up goveralls
20+
run: go install github.com/mattn/goveralls@latest
21+
- name: Run unit tests
22+
run: go test -race -covermode atomic -coverprofile=covprofile ./...
23+
- name: Send coverage
24+
env:
25+
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
26+
run: goveralls -coverprofile=covprofile -service=github

0 commit comments

Comments
 (0)