Upgrade maintained Go baseline to 1.26
This commit is contained in:
@@ -3,12 +3,12 @@ when:
|
||||
|
||||
steps:
|
||||
validate-release:
|
||||
image: golang:1.25.5
|
||||
image: golang:1.26.7
|
||||
commands:
|
||||
- ./scripts/check-release-candidate.sh "$CI_COMMIT_TAG"
|
||||
|
||||
build-release-assets:
|
||||
image: golang:1.25.5
|
||||
image: golang:1.26.7
|
||||
depends_on:
|
||||
- validate-release
|
||||
commands:
|
||||
|
||||
@@ -3,6 +3,6 @@ when:
|
||||
|
||||
steps:
|
||||
shuffled-race-tests:
|
||||
image: golang:1.25
|
||||
image: golang:1.26
|
||||
commands:
|
||||
- go test -race -shuffle=on -count=3 ./...
|
||||
|
||||
@@ -3,37 +3,37 @@ when:
|
||||
|
||||
steps:
|
||||
tests:
|
||||
image: golang:1.25
|
||||
image: golang:1.26
|
||||
commands:
|
||||
- go test ./...
|
||||
|
||||
race-tests:
|
||||
image: golang:1.25
|
||||
image: golang:1.26
|
||||
depends_on: tests
|
||||
commands:
|
||||
- go test -race ./...
|
||||
|
||||
static-analysis:
|
||||
image: golang:1.25
|
||||
image: golang:1.26
|
||||
depends_on: tests
|
||||
commands:
|
||||
- go vet ./...
|
||||
|
||||
build:
|
||||
image: golang:1.25
|
||||
image: golang:1.26
|
||||
depends_on: tests
|
||||
commands:
|
||||
- go build ./...
|
||||
|
||||
documentation-and-examples:
|
||||
image: golang:1.25
|
||||
image: golang:1.26
|
||||
depends_on: tests
|
||||
commands:
|
||||
- go test ./internal/doccheck
|
||||
- go test ./internal/config -run '^TestExamplesLoadAndValidate$'
|
||||
|
||||
cross-build:
|
||||
image: golang:1.25
|
||||
image: golang:1.26
|
||||
depends_on: [race-tests, static-analysis, build, documentation-and-examples]
|
||||
commands:
|
||||
- |
|
||||
|
||||
@@ -10,6 +10,11 @@ polished transcripts and generated artifacts. Start with the
|
||||
[Architecture](policy/architecture.md) for normative system boundaries, and the
|
||||
[Internal Overview](internal/overview.md) for implemented component ownership.
|
||||
|
||||
## Go Prerequisite
|
||||
|
||||
Maintained development and verification require Go 1.26. Use the official Go
|
||||
1.26 toolchain before running repository commands.
|
||||
|
||||
## What To Read
|
||||
|
||||
| When working on | Read | Why |
|
||||
|
||||
@@ -5,6 +5,13 @@ binary release. The synchronous release boundary is a successful push of one
|
||||
new tag to `origin`; Woodpecker and Gitea publication happen later and do not
|
||||
change that result.
|
||||
|
||||
## Go prerequisite
|
||||
|
||||
Release preparation requires the maintained Go 1.26 baseline. Tag CI currently
|
||||
uses the explicitly pinned `golang:1.26.7` image for candidate validation and
|
||||
asset construction; that asynchronous work does not change the tag-push
|
||||
completion boundary.
|
||||
|
||||
## Choose a version and write its note
|
||||
|
||||
Narratio is past `v1.0.0`. Use an unused stable tag in the exact form
|
||||
|
||||
@@ -140,7 +140,7 @@ During every stage:
|
||||
|
||||
## Stage 1 — Establish The Go 1.26 Baseline
|
||||
|
||||
**Status: Pending**
|
||||
**Status: Completed**
|
||||
|
||||
### Goal
|
||||
|
||||
|
||||
2
go.mod
2
go.mod
@@ -1,6 +1,6 @@
|
||||
module gitea.maximumdirect.net/eric/narratio
|
||||
|
||||
go 1.25.0
|
||||
go 1.26.0
|
||||
|
||||
require (
|
||||
github.com/aws/aws-sdk-go-v2/config v1.32.17
|
||||
|
||||
@@ -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