Skip to content

ci: test against the latest MyGo release weekly - #135

Merged
houko merged 2 commits into
mainfrom
ci/mygo-latest
Nov 14, 2026
Merged

houko merged 2 commits into
mainfrom
ci/mygo-latest

Conversation

@houko

@houko houko commented Nov 14, 2026

Copy link
Copy Markdown
Member

Summary

go.mod pins MyGo v0.9.0 as the minimum version, and CI only tests that version. Minimum version selection means an application that also requires a newer MyGo builds Nodra against the newer one. This PR adds a scheduled workflow that upgrades MyGo to its latest release and runs build, vet and the race tests. An upstream change that breaks Nodra then shows up here before a consumer reports it.

What

New workflow .github/workflows/mygo-latest.yml:

  • Triggers: weekly schedule (Monday 04:41 UTC) and workflow_dispatch. It does not run on pull requests, so a new MyGo release cannot block unrelated changes.
  • permissions: contents: read, persist-credentials: false, GOWORK=off. It uses the same pinned actions/checkout and actions/setup-go SHAs as test.yml, with go-version-file: go.mod.
  • Same OS matrix as test.yml (ubuntu-latest, macos-26-intel, macos-26, windows-latest), with fail-fast: false.
  • Steps: print the pinned and latest MyGo versions, then go get github.com/egoist/mygo@latest and go mod tidy with GOTOOLCHAIN=auto. If a newer MyGo needs a newer Go, the job then fetches that toolchain the way an application would, instead of failing early. It prints the resolved MyGo and Go versions to the log and the job summary, then runs go build ./..., go vet ./... and go test -race ./....
  • setup-go's module cache is disabled here. The cache key comes from the committed go.sum, so saving from this job would fill test.yml's cache with modules for a MyGo version that test.yml does not use.

The header comment explains who sees a failure. GitHub sends a failed scheduled run's notification to the person who last changed the workflow's cron schedule or re-enabled it, not to the yldm-tech organization. Whoever edits the schedule later takes over those alerts. The workflow does not open issues, because no other workflow in this repo does that.

test.yml is unchanged.

How tested

  • actionlint .github/workflows/*.yml: clean.
  • go test ./..., go test -race -count=1 ./..., go vet ./..., go mod tidy -diff, golangci-lint run ./...: all pass.
  • scripts/check-api.sh against a fresh clone of main: passes.
  • The upgrade path where Go raises its version cannot be exercised until MyGo publishes a release newer than v0.9.0. Today @latest resolves to the pinned version.

Compatibility

Only CI changes. No Go code or exported API changes, and the ci type does not trigger a release.

Trade-offs

  • A break in the latest MyGo shows up only as a failed scheduled run and its notification, not as an issue or a blocked PR. This is intentional, so an upstream release never gates unrelated work.
  • Disabling the cache makes each weekly run download modules from scratch. That cost is small for a weekly job and keeps test.yml's cache correct.

Screenshots

None.

Add a mygo-latest workflow that runs every Monday and on workflow_dispatch, never on pull requests. It upgrades github.com/egoist/mygo to @latest (go get, go mod tidy), prints the resolved MyGo and Go versions, and runs go build, go vet and go test -race on the same ubuntu, macOS Intel, macOS arm64 and Windows runners as the test matrix. The setup-go cache is disabled so the run does not fill the cache key the test workflow restores with modules for a different MyGo version.
GitHub sends a failed scheduled run's notification to the user who last changed the cron line or re-enabled the workflow, not to the repository owner, and yldm-tech is an organization. Correct the header comment so it describes how a failure is seen.
@houko
houko merged commit 4750752 into main Nov 14, 2026
23 checks passed
@houko
houko deleted the ci/mygo-latest branch November 14, 2026 03:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant