Upgrade maintained Go baseline to 1.26
This commit is contained in:
@@ -64,15 +64,15 @@ func TestReleaseWorkflowRequiresValidation(t *testing.T) {
|
||||
if !ok {
|
||||
t.Fatal("release workflow must define validate-release")
|
||||
}
|
||||
if validate.Image != "golang:1.25.5" || !containsWorkflowCommand(validate.Commands, `./scripts/check-release-candidate.sh "$CI_COMMIT_TAG"`) {
|
||||
t.Fatalf("validate-release = %#v, want the shared candidate checker in golang:1.25.5", validate)
|
||||
if validate.Image != "golang:1.26.7" || !containsWorkflowCommand(validate.Commands, `./scripts/check-release-candidate.sh "$CI_COMMIT_TAG"`) {
|
||||
t.Fatalf("validate-release = %#v, want the shared candidate checker in golang:1.26.7", validate)
|
||||
}
|
||||
assets, ok := workflow.Steps["build-release-assets"]
|
||||
if !ok {
|
||||
t.Fatal("release workflow must define build-release-assets")
|
||||
}
|
||||
if assets.Image != "golang:1.25.5" || !workflowDependsOn(workflow.Steps, "build-release-assets", "validate-release", map[string]bool{}) {
|
||||
t.Fatalf("build-release-assets = %#v, want validated golang:1.25.5 asset construction", assets)
|
||||
if assets.Image != "golang:1.26.7" || !workflowDependsOn(workflow.Steps, "build-release-assets", "validate-release", map[string]bool{}) {
|
||||
t.Fatalf("build-release-assets = %#v, want validated golang:1.26.7 asset construction", assets)
|
||||
}
|
||||
assetCommands := strings.Join(assets.Commands, "\n")
|
||||
if !strings.Contains(assetCommands, `./scripts/build-release-assets.sh "$CI_COMMIT_TAG" "$PWD/dist"`) || strings.Contains(assetCommands, "GOOS=") || strings.Contains(assetCommands, "go build") {
|
||||
|
||||
@@ -183,7 +183,7 @@ func TestCandidateCheckerRejectsRepositoryHygieneViolations(t *testing.T) {
|
||||
{
|
||||
name: "wrong module", want: "go.mod must declare module",
|
||||
prepare: func(t *testing.T, fixture *candidateFixture) {
|
||||
if err := os.WriteFile(filepath.Join(fixture.root, "go.mod"), []byte("module example.invalid/release\n\ngo 1.25.0\n"), 0o644); err != nil {
|
||||
if err := os.WriteFile(filepath.Join(fixture.root, "go.mod"), []byte("module example.invalid/release\n\ngo 1.26.0\n"), 0o644); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
},
|
||||
@@ -192,7 +192,7 @@ func TestCandidateCheckerRejectsRepositoryHygieneViolations(t *testing.T) {
|
||||
name: "tracked workspace", want: "tracked workspace file is not allowed",
|
||||
prepare: func(t *testing.T, fixture *candidateFixture) {
|
||||
path := filepath.Join(fixture.root, "go.work")
|
||||
if err := os.WriteFile(path, []byte("go 1.25.0\n"), 0o644); err != nil {
|
||||
if err := os.WriteFile(path, []byte("go 1.26.0\n"), 0o644); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
fixture.git("add", "go.work")
|
||||
@@ -364,7 +364,7 @@ func newCandidateFixture(t *testing.T) *candidateFixture {
|
||||
set -eu
|
||||
printf '%s build-release-assets %s\n' "${GOWORK:-}" "$1" >> "$NARRATIO_RELEASE_CHECK_LOG"
|
||||
`, 0o755)
|
||||
writeFixtureFile(t, filepath.Join(root, "go.mod"), "module gitea.maximumdirect.net/eric/narratio\n\ngo 1.25.0\n", 0o644)
|
||||
writeFixtureFile(t, filepath.Join(root, "go.mod"), "module gitea.maximumdirect.net/eric/narratio\n\ngo 1.26.0\n", 0o644)
|
||||
writeFixtureFile(t, filepath.Join(root, "main.go"), "package narratio\n", 0o644)
|
||||
notePath := filepath.Join(root, "docs", "releases", "v1.2.3.md")
|
||||
writeFixtureFile(t, notePath, "# Narratio v1.2.3\n\n## Summary\n\n## Compatibility\n\n## Upgrade\n\n## Changes\n", 0o644)
|
||||
|
||||
Reference in New Issue
Block a user