Skip to content

Commit a43de13

Browse files
authored
chore: add some basic ci (#1)
1 parent cb40f71 commit a43de13

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

.github/workflows/ci.yaml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: cli
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
workflow_dispatch:
8+
9+
jobs:
10+
ci:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
- uses: actions/setup-go@v5
15+
with:
16+
go-version: stable
17+
18+
- run: go mod tidy
19+
- run: go build -v ./...
20+
21+
- run: go install golang.org/x/tools/cmd/goimports@latest
22+
- run: go install mvdan.cc/gofumpt@latest
23+
- run: go install honnef.co/go/tools/cmd/staticcheck@latest
24+
25+
- run: goimports -w . && gofumpt -w .
26+
27+
- name: Verify no changes
28+
run: |
29+
if [ -n "$(git diff)" ]; then
30+
git diff
31+
exit 1
32+
fi
33+
34+
- run: go test -v ./...
35+
36+
- run: go vet -v ./...
37+
- run: staticcheck ./...

0 commit comments

Comments
 (0)