Skip to content

Commit 59ab9a1

Browse files
authored
Version updates for several build components (#23)
1 parent d9bf505 commit 59ab9a1

File tree

8 files changed

+27
-16
lines changed

8 files changed

+27
-16
lines changed

.github/workflows/main.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ jobs:
1818
- name: Setup go
1919
uses: actions/setup-go@v2
2020
with:
21-
go-version: 1.15
21+
go-version: 1.16
2222

2323
- name: Checkout code
2424
uses: actions/checkout@v2
2525

2626
- name: Build binary
27-
run: go build -o dist/retry -ldflags="-s -w -X main.version=$(git describe --tags)" .
27+
run: go build -o dist/retry -trimpath -ldflags="-s -w -X main.version=$(git describe --always)" .
2828

2929
- name: Sanity check version
3030
run: ./dist/retry -version
@@ -37,7 +37,7 @@ jobs:
3737
- name: Setup go
3838
uses: actions/setup-go@v2
3939
with:
40-
go-version: 1.15
40+
go-version: 1.16
4141

4242
- name: Checkout code
4343
uses: actions/checkout@v2
@@ -53,7 +53,7 @@ jobs:
5353
- name: Setup go
5454
uses: actions/setup-go@v2
5555
with:
56-
go-version: 1.15
56+
go-version: 1.16
5757

5858
- name: Checkout code
5959
uses: actions/checkout@v2

.github/workflows/release.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
- name: Setup go
1919
uses: actions/setup-go@v2
2020
with:
21-
go-version: 1.15
21+
go-version: 1.16
2222

2323
- name: Run GoReleaser
2424
env:

.golangci.yml

+2
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,14 @@ linters:
22
enable-all: true
33
disable:
44
- exhaustivestruct
5+
- forbidigo
56
- goerr113
67
- gomnd
78
- gosec
89
- lll
910
- maligned
1011
- nlreturn
12+
- paralleltest
1113
- testpackage
1214
- tparallel
1315
- wrapcheck

go.mod

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
module github.com/joshdk/retry
22

3-
go 1.12
3+
go 1.16
44

5-
require github.com/stretchr/testify v1.4.0
5+
require (
6+
github.com/davecgh/go-spew v1.1.1 // indirect
7+
github.com/stretchr/testify v1.7.0
8+
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
9+
)

go.sum

+8-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
22
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
3+
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
4+
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
35
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
46
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
57
github.com/stretchr/objx v0.1.0 h1:4G4v2dO3VZwixGIRoQ5Lfboy6nUhCyYzaqnIAPPhYs4=
68
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
7-
github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk=
8-
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
9+
github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
10+
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
911
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
1012
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
11-
gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw=
12-
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
13+
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
14+
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
15+
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo=
16+
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=

retry/retry_test.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -252,12 +252,13 @@ func checkError(t *testing.T, failureExpected bool, actual error) {
252252
}
253253

254254
func checkDuration(t *testing.T, expected time.Duration, actual time.Duration) {
255+
t.Helper()
256+
255257
// epsilon is the time duration delta that is allowed when comparing times.
256258
// Higher epsilon values result in longer time margins. Lower epsilon
257259
// values result in smaller time margins, but potentially flaky tests.
258260
epsilon := time.Millisecond * 500
259261

260-
t.Helper()
261262
if actual < expected-epsilon || expected+epsilon < actual {
262263
assert.Failf(t, "duration mismatch", "A duration of %v ± %v is expected but got %v", expected, epsilon, actual)
263264
}

scripts/install-golangci-lint

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ set -eu
33

44
platform="$(uname -s)"
55
if [ "$platform" = Linux ]; then
6-
prefix=golangci-lint-1.32.0-linux-amd64
6+
prefix=golangci-lint-1.39.0-linux-amd64
77
elif [ "$platform" = Darwin ]; then
8-
prefix=golangci-lint-1.32.0-darwin-amd64
8+
prefix=golangci-lint-1.39.0-darwin-amd64
99
fi
1010

1111
cd "$(mktemp -d)" || exit 1
12-
wget -q "https://github.com/golangci/golangci-lint/releases/download/v1.32.0/${prefix}.tar.gz"
12+
wget -q "https://github.com/golangci/golangci-lint/releases/download/v1.39.0/${prefix}.tar.gz"
1313
tar -xf "${prefix}.tar.gz"
1414
mkdir -p "$(dirname "$1")"
1515
install "${prefix}/golangci-lint" "$1"

scripts/install-goreleaser

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ elif [ "$platform" = Darwin ]; then
99
fi
1010

1111
cd "$(mktemp -d)" || exit 1
12-
wget -q "https://github.com/goreleaser/goreleaser/releases/download/v0.145.0/${prefix}.tar.gz"
12+
wget -q "https://github.com/goreleaser/goreleaser/releases/download/v0.164.0/${prefix}.tar.gz"
1313
tar -xf "${prefix}.tar.gz"
1414
mkdir -p "$(dirname "$1")"
1515
install goreleaser "$1"

0 commit comments

Comments
 (0)