Skip to content

Commit f332c3a

Browse files
committed
add: ci
1 parent 12339f1 commit f332c3a

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

.github/workflows/go.yml

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,11 @@ on:
99
pull_request:
1010
branches: [ "master" ]
1111

12-
jobs:
12+
permissions:
13+
contents: read
14+
pull-requests: read
1315

16+
jobs:
1417
build:
1518
runs-on: ubuntu-latest
1619
steps:
@@ -24,6 +27,23 @@ jobs:
2427
- name: Build
2528
run: go build -v ./...
2629

30+
- name: Go Format
31+
run: gofmt -s -w . && git diff --exit-code
32+
33+
- name: Go Tidy
34+
run: go mod tidy && git diff --exit-code
35+
36+
- name: Go mod verify
37+
run: go mod verify
38+
39+
- name: Run linter
40+
uses: golangci/golangci-lint-action@v3
41+
with:
42+
version: latest
43+
skip-cache: true
44+
skip-pkg-cache: true
45+
skip-build-cache: true
46+
2747
- name: Test
2848
run: go test -v ./...
2949

0 commit comments

Comments
 (0)