Skip to content

Commit 9dd02d8

Browse files
committed
Add workflow
1 parent 50c87f5 commit 9dd02d8

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

.github/workflows/main.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Test
2+
3+
on:
4+
- push
5+
- pull_request
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
name: Go ${{ matrix.go }}
11+
strategy:
12+
matrix:
13+
go:
14+
- '1.25'
15+
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v4
19+
20+
- name: Setup Go ${{ matrix.go }}
21+
uses: actions/setup-go@v4
22+
with:
23+
go-version: ${{ matrix.go }}
24+
25+
- name: Install tools
26+
run: |
27+
go install honnef.co/go/tools/cmd/staticcheck@latest
28+
go install golang.org/x/vuln/cmd/govulncheck@latest
29+
30+
- name: Vet
31+
run: go vet ./...
32+
33+
- name: Lint
34+
run: staticcheck ./...
35+
36+
- name: Security
37+
run: govulncheck ./...
38+
39+
- name: Build
40+
run: go build -v ./...
41+
42+
- name: Test
43+
run: go test -v -race -coverprofile=coverage.out -covermode=atomic ./...
44+
45+
- name: Upload coverage
46+
uses: coverallsapp/github-action@v2
47+
with:
48+
path-to-lcov: coverage.out
49+
parallel: false

0 commit comments

Comments
 (0)