-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (29 loc) · 723 Bytes
/
ci.yaml
File metadata and controls
37 lines (29 loc) · 723 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: cli
on:
push:
branches: [ master ]
pull_request:
workflow_dispatch:
jobs:
ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: stable
- run: go mod tidy
- run: go build -v ./...
- run: go install golang.org/x/tools/cmd/goimports@latest
- run: go install mvdan.cc/gofumpt@latest
- run: go install honnef.co/go/tools/cmd/staticcheck@latest
- run: goimports -w . && gofumpt -w .
- name: Verify no changes
run: |
if [ -n "$(git diff)" ]; then
git diff
exit 1
fi
- run: go test -v ./...
- run: go vet -v ./...
- run: staticcheck ./...