Skip to content
This repository was archived by the owner on Nov 21, 2024. It is now read-only.

Commit 9ec3fa1

Browse files
committed
Fix and Add more CI tests
1 parent 61f693f commit 9ec3fa1

File tree

1 file changed

+41
-7
lines changed

1 file changed

+41
-7
lines changed

.github/workflows/go.yml

Lines changed: 41 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,58 @@ name: Go
22

33
on:
44
push:
5-
branches: [ master ]
5+
branches: [ "main" ]
66
pull_request:
7-
branches: [ master ]
7+
branches: [ "main" ]
88

99
jobs:
10-
1110
build:
1211
runs-on: ubuntu-latest
1312
steps:
14-
- uses: actions/checkout@v2
13+
- uses: actions/checkout@v3
1514

1615
- name: Set up Go
17-
uses: actions/setup-go@v2
16+
uses: actions/setup-go@v4
1817
with:
19-
go-version: 1.18
18+
go-version: '1.21'
2019

2120
- name: Build
2221
run: go build -v ./...
2322

23+
check:
24+
runs-on: ubuntu-latest
25+
steps:
26+
- uses: actions/checkout@v4
27+
28+
- name: Set up Go
29+
uses: actions/setup-go@v4
30+
with:
31+
go-version: '1.21'
32+
33+
- name: Verify modfile
34+
run: go mod verify
35+
36+
- name: Vet
37+
run: go vet ./...
38+
39+
- name: Install golint
40+
run: go install golang.org/x/lint/golint@latest
41+
42+
- name: Lint
43+
run: golint -set_exit_status ./...
44+
45+
- name: Check code formatting using gofmt
46+
uses: Jerome1337/[email protected]
47+
48+
test:
49+
runs-on: ubuntu-latest
50+
steps:
51+
- uses: actions/checkout@v4
52+
53+
- name: Set up Go
54+
uses: actions/setup-go@v4
55+
with:
56+
go-version: '1.21'
57+
2458
- name: Test
25-
run: go test -v ./...
59+
run: go test -v ./...

0 commit comments

Comments
 (0)