Skip to content

Commit 61107b5

Browse files
committed
Modernize CI template; bump Go and dependencies
1 parent f4a6e5a commit 61107b5

4 files changed

Lines changed: 91 additions & 103 deletions

File tree

.github/workflows/tests.yaml

Lines changed: 24 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1+
name: Go CI
2+
13
on:
24
push:
3-
branches:
4-
- main
5+
branches: [ main ]
56
pull_request:
6-
branches:
7-
- "**"
7+
branches: [ "**" ]
88

99
concurrency:
1010
group: golangci-lint-${{ github.ref }}
@@ -16,31 +16,37 @@ permissions:
1616

1717
jobs:
1818
test:
19-
name: test
19+
name: Test
2020
runs-on: ubuntu-latest
21+
2122
steps:
22-
- name: checkout
23-
uses: actions/checkout@v3
23+
- name: Checkout code
24+
uses: actions/checkout@v4
2425

25-
- uses: actions/setup-go@v4
26+
- name: Set up Go
27+
uses: actions/setup-go@v5
2628
with:
27-
go-version: "^1.22.x"
29+
go-version: '^1.24.x'
30+
cache: true
2831

29-
- name: tests
30-
run: |
31-
go test ./...
32+
- name: Run tests (no cache)
33+
run: go test -v ./...
3234

3335
lint:
34-
name: lint
36+
name: Lint
3537
runs-on: ubuntu-latest
38+
3639
steps:
37-
- name: checkout
38-
uses: actions/checkout@v3
40+
- name: Checkout code
41+
uses: actions/checkout@v4
3942

40-
- uses: actions/setup-go@v4
43+
- name: Set up Go
44+
uses: actions/setup-go@v5
4145
with:
42-
go-version: "^1.22.x"
43-
- name: golangci-lint
46+
go-version: '^1.24.x'
47+
cache: true
48+
49+
- name: Run golangci-lint
4450
uses: golangci/golangci-lint-action@v3
4551
with:
4652
version: v1.56

commands/root.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,6 @@ func initConfig() {
137137

138138
func fail(kind string, err error) {
139139
red := color.New(color.FgHiRed)
140-
_, _ = red.Fprintf(os.Stderr, fmt.Sprintf("%s error: %s\n", kind, err))
140+
_, _ = red.Fprintf(os.Stderr, "%s error: %s\n", kind, err)
141141
os.Exit(1)
142142
}

go.mod

Lines changed: 21 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
11
module github.com/shipyard/shipyard-cli
22

3-
go 1.22
3+
go 1.24
44

55
require (
6-
github.com/agnivade/levenshtein v1.1.1
7-
github.com/docker/cli v25.0.3+incompatible
6+
github.com/agnivade/levenshtein v1.2.1
7+
github.com/docker/cli v28.4.0+incompatible
88
github.com/dsnet/compress v0.0.1
9-
github.com/fatih/color v1.16.0
10-
github.com/google/go-cmp v0.6.0
9+
github.com/fatih/color v1.18.0
10+
github.com/google/go-cmp v0.7.0
11+
github.com/mattn/go-isatty v0.0.20
1112
github.com/olekukonko/tablewriter v0.0.5
1213
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c
13-
github.com/spf13/cobra v1.8.0
14-
github.com/spf13/viper v1.18.2
14+
github.com/spf13/cobra v1.10.1
15+
github.com/spf13/viper v1.21.0
1516
gopkg.in/yaml.v3 v3.0.1
1617
k8s.io/api v0.25.16
1718
k8s.io/apimachinery v0.25.16
@@ -24,53 +25,47 @@ require (
2425
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect
2526
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
2627
github.com/emicklei/go-restful/v3 v3.8.0 // indirect
27-
github.com/fsnotify/fsnotify v1.7.0 // indirect
28+
github.com/fsnotify/fsnotify v1.9.0 // indirect
2829
github.com/go-logr/logr v1.2.3 // indirect
2930
github.com/go-openapi/jsonpointer v0.19.5 // indirect
3031
github.com/go-openapi/jsonreference v0.19.5 // indirect
3132
github.com/go-openapi/swag v0.19.14 // indirect
33+
github.com/go-viper/mapstructure/v2 v2.4.0 // indirect
3234
github.com/gogo/protobuf v1.3.2 // indirect
3335
github.com/golang/protobuf v1.5.3 // indirect
3436
github.com/google/gnostic v0.5.7-v3refs // indirect
3537
github.com/google/gofuzz v1.1.0 // indirect
36-
github.com/hashicorp/hcl v1.0.0 // indirect
3738
github.com/imdario/mergo v0.3.6 // indirect
3839
github.com/inconshreveable/mousetrap v1.1.0 // indirect
3940
github.com/josharian/intern v1.0.0 // indirect
4041
github.com/json-iterator/go v1.1.12 // indirect
41-
github.com/magiconair/properties v1.8.7 // indirect
4242
github.com/mailru/easyjson v0.7.6 // indirect
4343
github.com/mattn/go-colorable v0.1.13 // indirect
44-
github.com/mattn/go-isatty v0.0.20 // indirect
45-
github.com/mattn/go-runewidth v0.0.9 // indirect
46-
github.com/mitchellh/mapstructure v1.5.0 // indirect
44+
github.com/mattn/go-runewidth v0.0.16 // indirect
4745
github.com/moby/spdystream v0.2.0 // indirect
4846
github.com/moby/term v0.0.0-20221105221325-4eb28fa6025c // indirect
4947
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
5048
github.com/modern-go/reflect2 v1.0.2 // indirect
5149
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
52-
github.com/pelletier/go-toml/v2 v2.1.0 // indirect
53-
github.com/sagikazarmark/locafero v0.4.0 // indirect
54-
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
50+
github.com/pelletier/go-toml/v2 v2.2.4 // indirect
51+
github.com/rivo/uniseg v0.2.0 // indirect
52+
github.com/sagikazarmark/locafero v0.11.0 // indirect
5553
github.com/sirupsen/logrus v1.9.0 // indirect
56-
github.com/sourcegraph/conc v0.3.0 // indirect
57-
github.com/spf13/afero v1.11.0 // indirect
58-
github.com/spf13/cast v1.6.0 // indirect
59-
github.com/spf13/pflag v1.0.5 // indirect
54+
github.com/sourcegraph/conc v0.3.1-0.20240121214520-5f936abd7ae8 // indirect
55+
github.com/spf13/afero v1.15.0 // indirect
56+
github.com/spf13/cast v1.10.0 // indirect
57+
github.com/spf13/pflag v1.0.10 // indirect
6058
github.com/subosito/gotenv v1.6.0 // indirect
61-
go.uber.org/atomic v1.9.0 // indirect
62-
go.uber.org/multierr v1.9.0 // indirect
63-
golang.org/x/exp v0.0.0-20230905200255-921286631fa9 // indirect
59+
go.yaml.in/yaml/v3 v3.0.4 // indirect
6460
golang.org/x/net v0.19.0 // indirect
6561
golang.org/x/oauth2 v0.15.0 // indirect
66-
golang.org/x/sys v0.15.0 // indirect
62+
golang.org/x/sys v0.29.0 // indirect
6763
golang.org/x/term v0.15.0 // indirect
68-
golang.org/x/text v0.14.0 // indirect
64+
golang.org/x/text v0.28.0 // indirect
6965
golang.org/x/time v0.5.0 // indirect
7066
google.golang.org/appengine v1.6.7 // indirect
7167
google.golang.org/protobuf v1.33.0 // indirect
7268
gopkg.in/inf.v0 v0.9.1 // indirect
73-
gopkg.in/ini.v1 v1.67.0 // indirect
7469
gopkg.in/yaml.v2 v2.4.0 // indirect
7570
k8s.io/klog/v2 v2.70.1 // indirect
7671
k8s.io/kube-openapi v0.0.0-20220803162953-67bda5d908f1 // indirect

0 commit comments

Comments
 (0)