Skip to content

Commit d612d92

Browse files
authored
Merge pull request #51 from choria-io/go_1_22
(misc) Require go 1.22
2 parents d0da121 + e9153c6 commit d612d92

File tree

4 files changed

+124
-8
lines changed

4 files changed

+124
-8
lines changed

Diff for: .github/workflows/test.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ jobs:
55
test:
66
strategy:
77
matrix:
8-
go: ["1.20", "1.21"]
8+
go: ["1.22", "1.23"]
99

1010
runs-on: ubuntu-latest
1111
steps:

Diff for: ABTaskFile

+116
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
name: build_tasks
2+
description: Choria Build Tasks
3+
4+
commands:
5+
- name: dependencies
6+
type: parent
7+
description: Manage dependencies
8+
aliases: [d]
9+
commands:
10+
- name: update
11+
description: Update dependencies
12+
type: exec
13+
aliases: [up]
14+
dir: "{{ AppDir }}"
15+
flags:
16+
- name: verbose
17+
description: Log verbosely
18+
short: v
19+
bool: true
20+
- name: proxy
21+
description: Enable using go proxy
22+
bool: true
23+
default: "true"
24+
script: |
25+
. "{{ BashHelperPath }}"
26+
27+
ab_announce Updating all dependencies
28+
echo
29+
30+
{{ if eq .Flags.proxy false }}
31+
export GOPROXY=direct
32+
ab_say Disabling go mod proxy
33+
{{ end }}
34+
35+
go get -u -n -a -t {{- if .Flags.verbose }} -d -x {{ end }} ./...
36+
37+
ab_say Running go mod tidy
38+
39+
go mod tidy
40+
41+
- name: test
42+
type: parent
43+
aliases: [t]
44+
description: Perform various tests
45+
commands:
46+
- name: unit
47+
type: exec
48+
description: Run ginkgo unit tests
49+
aliases: [u]
50+
arguments:
51+
- name: dir
52+
description: Directory to test
53+
default: .
54+
flags:
55+
- name: update
56+
description: Updates the ginkgo runtime
57+
bool: true
58+
script: |
59+
set -e
60+
61+
. "{{ BashHelperPath }}"
62+
63+
{{ if .Flags.update }}
64+
ab_say Updating ginkgo binary
65+
go install github.com/onsi/ginkgo/v2/ginkgo
66+
{{ end }}
67+
68+
ginkgo -r --skip Integration {{ .Arguments.dir | escape }}
69+
70+
- name: lint
71+
type: exec
72+
dir: "{{ AppDir }}"
73+
flags:
74+
- name: vet
75+
description: Perform go vet
76+
bool: true
77+
default: true
78+
- name: staticcheck
79+
description: Perform staticcheck
80+
bool: true
81+
default: true
82+
- name: update
83+
description: Updates lint dependencies
84+
bool: true
85+
script: |
86+
set -e
87+
88+
. "{{ BashHelperPath }}"
89+
90+
{{ if .Flags.update }}
91+
ab_say Updating linting tools
92+
go install github.com/client9/misspell/cmd/misspell@latest
93+
go install honnef.co/go/tools/cmd/staticcheck@latest
94+
{{ else }}
95+
echo ">>> Run with --update to install required commands"
96+
echo
97+
{{ end }}
98+
99+
ab_say Formatting source files
100+
go fmt ./...
101+
102+
ab_say Tidying go mod
103+
go mod tidy
104+
105+
ab_say Checking spelling
106+
find . -type f -name "*.go" | xargs misspell -error -locale US -i flavour
107+
108+
{{ if .Flags.vet }}
109+
ab_say Performing go vet
110+
go vet ./...
111+
{{ end }}
112+
113+
{{ if .Flags.staticcheck }}
114+
ab_say Running staticcheck
115+
staticcheck ./...
116+
{{ end }}

Diff for: go.mod

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
module github.com/choria-io/fisk
22

3-
go 1.20
3+
go 1.22.0
44

55
require (
6-
github.com/stretchr/testify v1.8.4
7-
golang.org/x/text v0.14.0
6+
github.com/stretchr/testify v1.9.0
7+
golang.org/x/text v0.17.0
88
)
99

1010
require (

Diff for: go.sum

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c
22
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
33
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
44
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
5-
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
6-
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
7-
golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
8-
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
5+
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
6+
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
7+
golang.org/x/text v0.17.0 h1:XtiM5bkSOt+ewxlOE/aE/AKEHibwj/6gvWMl9Rsh0Qc=
8+
golang.org/x/text v0.17.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY=
99
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
1010
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
1111
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=

0 commit comments

Comments
 (0)