Skip to content

Commit 841c424

Browse files
committed
chore: add a ci workflow
1 parent 2c70c67 commit 841c424

1 file changed

Lines changed: 33 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
- uses: actions/setup-go@v5
17+
with:
18+
go-version-file: go.mod
19+
- name: gofmt
20+
run: test -z "$(gofmt -l .)"
21+
- run: go vet ./...
22+
- run: go build ./...
23+
- run: go test -race ./...
24+
- name: staticcheck
25+
run: go run honnef.co/go/tools/cmd/staticcheck@latest ./...
26+
- name: govulncheck
27+
run: go run golang.org/x/vuln/cmd/govulncheck@latest ./...
28+
29+
container:
30+
runs-on: ubuntu-latest
31+
steps:
32+
- uses: actions/checkout@v4
33+
- run: docker build .

0 commit comments

Comments
 (0)