Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Go to 1.22 #32

Merged
merged 1 commit into from
Apr 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .buildkite/pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ steps:
command: .buildkite/steps/lint.sh
plugins:
- docker#v5.9.0:
image: "golang:1.21"
image: "golang:1.22"

- name: ":go::test_tube: Test"
key: test
command: ".buildkite/steps/test.sh"
artifact_paths: junit-*.xml
plugins:
- docker#v5.9.0:
image: "golang:1.21"
image: "golang:1.22"
propagate-environment: true
- artifacts#v1.9.0:
upload: "cover.{html,out}"
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
module github.com/buildkite/go-pipeline

go 1.21
go 1.22

toolchain go1.21.4
toolchain go1.22.1

retract (
v1.0.1 // Solely to publish the retraction of v1.0.0. We'll skip straight to v1.0.2 when we're ready to publish
Expand Down
4 changes: 0 additions & 4 deletions interpolate_matrix_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ func TestMatrixInterpolater_Simple(t *testing.T) {
}

for _, test := range tests {
test := test
t.Run(test.name, func(t *testing.T) {
t.Parallel()
got, err := transform.Transform(test.input)
Expand Down Expand Up @@ -84,7 +83,6 @@ func TestMatrixInterpolater_Multiple(t *testing.T) {
}

for _, test := range tests {
test := test
t.Run(test.name, func(t *testing.T) {
t.Parallel()
got, err := transform.Transform(test.input)
Expand Down Expand Up @@ -123,7 +121,6 @@ func TestMatrixInterpolator_Errors(t *testing.T) {
}

for _, test := range tests {
test := test
t.Run(test.name, func(t *testing.T) {
t.Parallel()
if _, err := test.transform.Transform(test.input); err == nil {
Expand Down Expand Up @@ -237,7 +234,6 @@ func TestMatrixInterpolateAny(t *testing.T) {
}

for _, tc := range cases {
tc := tc
t.Run(tc.name, func(t *testing.T) {
t.Parallel()

Expand Down
1 change: 0 additions & 1 deletion interpolate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,6 @@ func TestInterpolator(t *testing.T) {
},
},
} {
tc := tc
t.Run(tc.name, func(t *testing.T) {
t.Parallel()

Expand Down
1 change: 0 additions & 1 deletion jwkutil/validate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ func TestValidateJWKDisallows(t *testing.T) {
}

for _, tc := range cases {
tc := tc
t.Run(tc.name, func(t *testing.T) {
t.Parallel()

Expand Down
9 changes: 0 additions & 9 deletions ordered/map_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ func TestMapGet(t *testing.T) {
}

for _, test := range tests {
test := test
t.Run(test.desc, func(t *testing.T) {
t.Parallel()

Expand Down Expand Up @@ -136,7 +135,6 @@ func TestMapSet(t *testing.T) {
}

for _, test := range tests {
test := test
t.Run(test.desc, func(t *testing.T) {
t.Parallel()

Expand Down Expand Up @@ -218,7 +216,6 @@ func TestMapReplace(t *testing.T) {
}

for _, test := range tests {
test := test
t.Run(test.desc, func(t *testing.T) {
t.Parallel()

Expand Down Expand Up @@ -279,7 +276,6 @@ func TestMapDelete(t *testing.T) {
}

for _, test := range tests {
test := test
t.Run(test.desc, func(t *testing.T) {
t.Parallel()

Expand Down Expand Up @@ -342,7 +338,6 @@ func TestMarshalJSON(t *testing.T) {
}

for _, test := range tests {
test := test
t.Run(test.desc, func(t *testing.T) {
t.Parallel()
got, err := json.Marshal(test.input)
Expand Down Expand Up @@ -384,7 +379,6 @@ func TestToMap(t *testing.T) {
}

for _, test := range tests {
test := test
t.Run(test.desc, func(t *testing.T) {
t.Parallel()
got := test.input.ToMap()
Expand Down Expand Up @@ -450,7 +444,6 @@ alpaca: drama
}

for _, test := range tests {
test := test
t.Run(test.desc, func(t *testing.T) {
t.Parallel()
got, err := yaml.Marshal(test.input)
Expand Down Expand Up @@ -654,7 +647,6 @@ d:
}

for _, test := range tests {
test := test
t.Run(test.desc, func(t *testing.T) {
t.Parallel()

Expand Down Expand Up @@ -758,7 +750,6 @@ hello:
}

for _, test := range tests {
test := test
t.Run(test.desc, func(t *testing.T) {
t.Parallel()

Expand Down
5 changes: 0 additions & 5 deletions ordered/unmarshal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -666,7 +666,6 @@ func TestUnmarshal(t *testing.T) {
}

for _, test := range tests {
test := test
t.Run(test.desc, func(t *testing.T) {
t.Parallel()
if err := Unmarshal(test.src, test.dst); err != nil {
Expand Down Expand Up @@ -778,7 +777,6 @@ func TestUnmarshalIntoNilErrors(t *testing.T) {
}

for _, test := range tests {
test := test
t.Run(test.desc, func(t *testing.T) {
t.Parallel()

Expand Down Expand Up @@ -858,7 +856,6 @@ func TestUnmarshalIncompatibleTypesErrors(t *testing.T) {
}

for _, test := range tests {
test := test
t.Run(test.desc, func(t *testing.T) {
t.Parallel()

Expand Down Expand Up @@ -888,7 +885,6 @@ func TestUnmarshalNotAPointerErrors(t *testing.T) {
}

for _, test := range tests {
test := test
t.Run(test.desc, func(t *testing.T) {
t.Parallel()

Expand Down Expand Up @@ -978,7 +974,6 @@ func TestMapUnmarshalOrderedErrors(t *testing.T) {
}

for _, test := range tests {
test := test
t.Run(test.desc, func(t *testing.T) {
t.Parallel()

Expand Down
1 change: 0 additions & 1 deletion parser_matrix_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,6 @@ steps:
}

for _, test := range tests {
test := test
t.Run(test.desc, func(t *testing.T) {
t.Parallel()
got, err := Parse(strings.NewReader(test.input))
Expand Down
2 changes: 0 additions & 2 deletions parser_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,6 @@ steps:
}`

for _, test := range tests {
test := test
t.Run(test.desc, func(t *testing.T) {
t.Parallel()

Expand Down Expand Up @@ -2051,7 +2050,6 @@ steps:
}

for _, test := range tests {
test := test
t.Run(test.desc, func(t *testing.T) {
t.Parallel()
got, err := Parse(strings.NewReader(test.input))
Expand Down
1 change: 0 additions & 1 deletion plugin_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,6 @@ func TestPluginMatrixInterpolate(t *testing.T) {
}

for _, test := range tests {
test := test
t.Run(test.name, func(t *testing.T) {
t.Parallel()

Expand Down
4 changes: 1 addition & 3 deletions signature/sign_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ func TestSignVerify(t *testing.T) {

keyName := "TEST_DO_NOT_USE"
for _, tc := range cases {
tc := tc
t.Run(tc.name, func(t *testing.T) {
t.Parallel()

Expand Down Expand Up @@ -338,7 +337,6 @@ func TestSignVerifyEnv(t *testing.T) {
}

for _, tc := range cases {
tc := tc
t.Run(tc.name, func(t *testing.T) {
t.Parallel()
signer, verifier, err := jwkutil.NewSymmetricKeyPairFromString(keyID, "alpacas", jwa.HS256)
Expand Down Expand Up @@ -394,7 +392,7 @@ func TestSignatureStability(t *testing.T) {

// there are n! permutations of n items, but only one is correct
// 128! is absurdly large, and we fill four maps...
for i := 0; i < 128; i++ {
for range 128 {
env[fmt.Sprintf("VAR%08x", rand.Uint32())] = fmt.Sprintf("VAL%08x", rand.Uint32())
step.Env[fmt.Sprintf("VAR%08x", rand.Uint32())] = fmt.Sprintf("VAL%08x", rand.Uint32())
pluginCfg[fmt.Sprintf("key%08x", rand.Uint32())] = fmt.Sprintf("value%08x", rand.Uint32())
Expand Down
4 changes: 0 additions & 4 deletions step_command_matrix_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ func TestMatrix_ValidatePermutation_Simple(t *testing.T) {
}

for _, test := range tests {
test := test
t.Run(test.name, func(t *testing.T) {
t.Parallel()

Expand Down Expand Up @@ -183,7 +182,6 @@ func TestMatrix_ValidatePermutation_Multiple(t *testing.T) {
}

for _, test := range tests {
test := test
t.Run(test.name, func(t *testing.T) {
t.Parallel()

Expand Down Expand Up @@ -220,7 +218,6 @@ func TestMatrix_ValidatePermutation_Nil(t *testing.T) {
}

for _, test := range tests {
test := test
t.Run(test.name, func(t *testing.T) {
t.Parallel()

Expand Down Expand Up @@ -288,7 +285,6 @@ func TestMatrix_ValidatePermutation_InvalidAdjustment(t *testing.T) {
}

for _, test := range tests {
test := test
t.Run(test.name, func(t *testing.T) {
err := test.matrix.validatePermutation(perm)
if !errors.Is(err, test.want) {
Expand Down
1 change: 0 additions & 1 deletion step_command_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,6 @@ func TestStepCommandMatrixInterpolate(t *testing.T) {
}

for _, tc := range tests {
tc := tc
t.Run(tc.name, func(t *testing.T) {
tf := newMatrixInterpolator(tc.ms)
if err := tc.step.interpolate(tf); err != nil {
Expand Down