chore(CI): run tests on Go versions N and N-1 #3080
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Run tests on CI with Go version
stable
(latest stable release) andoldstable
(previous) which are currently 1.24.x and 1.23.x.Previously the tests were only executed against the version declared in go.mod which is so far go 1.23.
Description
Change the CI workflow to run tests on rolling 'stable' and 'oldstable' releases of Go.
The LoadYAML test in pkg/apis/options/load_test.go had to be adapted because it doesn't pass on Go 1.24 because of a behaviour change in
encoding/json
(see CL 606956). So now the test pass on Go 1.24, but we disable that testsuite on Go 1.23 with a compile guard (I don't think it was worth the effort to develop a fix for those tests to work on both 1.23 and 1.24, as 1.23 will soon be out of the Go Team maintenance window).Motivation and Context
So far tests only run against the Go version declared in go.mod which is 1.23.x. This means tests are not executed against the current stable release of Go (1.24.x). In fact running the tests on Go 1.24 has revealed a failing test that required adapting the testsuite.
How Has This Been Tested?
The push of this PR will trigger CI!
Checklist: