Skip to content

Commit ef557f1

Browse files
Merge pull request #40 from shipyard/update-deps-add-ci-pipeline
Upgrade Go, bump dependencies, add a CI pipeline
2 parents 9c1126d + ce1fd34 commit ef557f1

5 files changed

Lines changed: 114 additions & 403 deletions

File tree

.github/workflows/tests.yaml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
on:
2+
push:
3+
branches:
4+
- main
5+
pull_request:
6+
branches:
7+
- "**"
8+
9+
concurrency:
10+
group: golangci-lint-${{ github.ref }}
11+
cancel-in-progress: true
12+
13+
permissions:
14+
contents: read
15+
pull-requests: read
16+
17+
jobs:
18+
test:
19+
name: test
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: checkout
23+
uses: actions/checkout@v3
24+
25+
- uses: actions/setup-go@v4
26+
with:
27+
go-version: "^1.22.x"
28+
29+
- name: tests
30+
run: |
31+
go test ./... -race -cover
32+
33+
lint:
34+
name: lint
35+
runs-on: ubuntu-latest
36+
steps:
37+
- name: checkout
38+
uses: actions/checkout@v3
39+
40+
- uses: actions/setup-go@v4
41+
with:
42+
go-version: "^1.22.x"
43+
- name: golangci-lint
44+
uses: golangci/golangci-lint-action@v3
45+
with:
46+
version: v1.56
47+
args: --timeout=5m --config=.golangci.yaml --issues-exit-code=0

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:1.21 AS build
1+
FROM golang:1.22 AS build
22

33
WORKDIR /app
44

@@ -13,8 +13,8 @@ ENV VERSION=$version
1313
ENV GIT_COMMIT=$git_commit
1414

1515
# SY errors out obtaining VCS status: exit status 128
16-
RUN CGO_ENABLED=0 go build -buildvcs=false -o /shipyard \
16+
RUN CGO_ENABLED=0 go build -trimpath -buildvcs=false -o /shipyard \
1717
-ldflags "-s -w -X github.com/shipyard/shipyard-cli/version.Version=${VERSION} -X github.com/shipyard/shipyard-cli/version.GitCommit=${GIT_COMMIT}"
1818

19-
FROM alpine:3.18
19+
FROM alpine:3.19
2020
COPY --from=build /shipyard /usr/local/bin

docker-compose.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ version: '3'
33
services:
44
shipyard-cli:
55
build: '.'
6-
command: ["/bin/sh", "-c", "while true; do sleep 86400; done"]
6+
command: [ "/bin/sh", "-c", "while true; do sleep 86400; done" ]

go.mod

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

3-
go 1.21
3+
go 1.22
44

55
require (
66
github.com/agnivade/levenshtein v1.1.1
7-
github.com/docker/cli v24.0.7+incompatible
7+
github.com/docker/cli v25.0.3+incompatible
88
github.com/dsnet/compress v0.0.1
9-
github.com/fatih/color v1.15.0
9+
github.com/fatih/color v1.16.0
1010
github.com/google/go-cmp v0.6.0
1111
github.com/olekukonko/tablewriter v0.0.5
12-
github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8
13-
github.com/spf13/cobra v1.7.0
14-
github.com/spf13/viper v1.17.0
12+
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
1515
gopkg.in/yaml.v3 v3.0.1
16-
k8s.io/api v0.25.15
17-
k8s.io/apimachinery v0.25.15
18-
k8s.io/client-go v0.25.15
16+
k8s.io/api v0.25.16
17+
k8s.io/apimachinery v0.25.16
18+
k8s.io/client-go v0.25.16
1919
)
2020

2121
require (
@@ -24,7 +24,7 @@ require (
2424
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect
2525
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
2626
github.com/emicklei/go-restful/v3 v3.8.0 // indirect
27-
github.com/fsnotify/fsnotify v1.6.0 // indirect
27+
github.com/fsnotify/fsnotify v1.7.0 // indirect
2828
github.com/go-logr/logr v1.2.3 // indirect
2929
github.com/go-openapi/jsonpointer v0.19.5 // indirect
3030
github.com/go-openapi/jsonreference v0.19.5 // indirect
@@ -41,7 +41,7 @@ require (
4141
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.17 // indirect
44+
github.com/mattn/go-isatty v0.0.20 // indirect
4545
github.com/mattn/go-runewidth v0.0.9 // indirect
4646
github.com/mitchellh/mapstructure v1.5.0 // indirect
4747
github.com/moby/spdystream v0.2.0 // indirect
@@ -50,23 +50,23 @@ require (
5050
github.com/modern-go/reflect2 v1.0.2 // indirect
5151
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
5252
github.com/pelletier/go-toml/v2 v2.1.0 // indirect
53-
github.com/sagikazarmark/locafero v0.3.0 // indirect
53+
github.com/sagikazarmark/locafero v0.4.0 // indirect
5454
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
5555
github.com/sirupsen/logrus v1.9.0 // indirect
5656
github.com/sourcegraph/conc v0.3.0 // indirect
57-
github.com/spf13/afero v1.10.0 // indirect
58-
github.com/spf13/cast v1.5.1 // indirect
57+
github.com/spf13/afero v1.11.0 // indirect
58+
github.com/spf13/cast v1.6.0 // indirect
5959
github.com/spf13/pflag v1.0.5 // indirect
6060
github.com/subosito/gotenv v1.6.0 // indirect
6161
go.uber.org/atomic v1.9.0 // indirect
6262
go.uber.org/multierr v1.9.0 // indirect
6363
golang.org/x/exp v0.0.0-20230905200255-921286631fa9 // indirect
64-
golang.org/x/net v0.17.0 // indirect
65-
golang.org/x/oauth2 v0.12.0 // indirect
66-
golang.org/x/sys v0.13.0 // indirect
67-
golang.org/x/term v0.13.0 // indirect
68-
golang.org/x/text v0.13.0 // indirect
69-
golang.org/x/time v0.3.0 // indirect
64+
golang.org/x/net v0.19.0 // indirect
65+
golang.org/x/oauth2 v0.15.0 // indirect
66+
golang.org/x/sys v0.15.0 // indirect
67+
golang.org/x/term v0.15.0 // indirect
68+
golang.org/x/text v0.14.0 // indirect
69+
golang.org/x/time v0.5.0 // indirect
7070
google.golang.org/appengine v1.6.7 // indirect
7171
google.golang.org/protobuf v1.31.0 // indirect
7272
gopkg.in/inf.v0 v0.9.1 // indirect

0 commit comments

Comments
 (0)