Skip to content

Commit f37ea32

Browse files
authored
fix ci, use go v1.19 (#16)
* use go v1.19 * use matrix * adding Makefile * test Co-authored-by: Dinh Q. Nguyen <[email protected]>
1 parent 1841481 commit f37ea32

File tree

3 files changed

+25
-14
lines changed

3 files changed

+25
-14
lines changed

.github/workflows/test.yml

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,32 +3,28 @@ on: [push, pull_request]
33

44
jobs:
55
test:
6+
strategy:
7+
matrix:
8+
go: [1.18, 1.19]
9+
610
name: Test
711
runs-on: ubuntu-latest
812
steps:
913

10-
- name: Set up Go 1.16
14+
- name: Set up Go
1115
uses: actions/setup-go@v2
1216
with:
13-
go-version: ^1.16
14-
id: go
17+
go-version: ${{matrix.go}}
1518

1619
- name: Check out code
1720
uses: actions/checkout@v2
1821

19-
- name: Install deps
20-
shell: bash --noprofile --norc -x -eo pipefail {0}
21-
run: |
22-
go get -u honnef.co/go/tools/cmd/staticcheck
23-
go get -u github.com/client9/misspell/cmd/misspell
24-
2522
- name: Lint
26-
shell: bash --noprofile --norc -x -eo pipefail {0}
2723
run: |
28-
$(exit $(go fmt ./... | wc -l))
29-
misspell -error -locale US .
30-
staticcheck ./...
24+
ls -al
25+
make lint-pkgs
26+
make lint
3127
3228
- name: Test
3329
run: |
34-
go test -race ./...
30+
make test

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
*.dll
55
*.so
66
*.dylib
7+
.idea/
78

89
# Test binary, build with `go test -c`
910
*.test

Makefile

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
.PHONY: lint-pkgs lint test
2+
3+
lint-pkgs:
4+
GO111MODULE=off go get -u honnef.co/go/tools/cmd/staticcheck
5+
GO111MODULE=off go get -u github.com/client9/misspell/cmd/misspell
6+
7+
lint:
8+
$(exit $(go fmt ./... | wc -l))
9+
go vet ./...
10+
find . -type f -name "*.go" | xargs misspell -error -locale US
11+
staticcheck $(go list ./...)
12+
13+
test:
14+
go test -race ./...

0 commit comments

Comments
 (0)