story(issue-70): add Check terminal to Go.Ci#76
Merged
Conversation
Extracts the stage-1 parallel checks from Ci.Run into its own public terminal Check(ctx) error so multi-platform pipelines can run the checks once and build per platform. Run now delegates to Check then runBuild; no behavior change to existing callers. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR extends the daggerverse/go module’s CI chained builder by introducing a new terminal, Ci.Check(ctx) error, so downstream pipelines can run the stage-1 checks once and then perform builds separately (e.g., per-platform) without re-running fmt/vet/lint/test.
Changes:
- Extracted the stage-1 parallel checks into a new
Ci.Check(ctx) errorterminal and refactoredCi.Runto delegate toCheckbefore building. - Updated
Ciuser-facing docs to mention the newCheckterminal. - Added a new test entry
CiCheckRunsEnabledChecksAndSkipsBuildand registered it in the tests suite.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| daggerverse/go/ci.go | Adds Ci.Check and refactors Run to call Check then build. |
| daggerverse/go/tests/main.go | Registers and implements a new test that exercises Ci.Check on a clean fixture. |
Address review feedback on #76: the prior test only enforced "build output not returned" structurally. Configure WithBuild with a non-existent package path so any internal runBuild invocation would surface as a `go build` failure. A nil return now proves both that the checks passed and that the build was skipped. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Ci.Runinto a new public terminalCheck(ctx) errorondaggerverse/go/ci.go.Runto delegate:Check(ctx)→runBuild(ctx). No behavior change to existing callers.CiCheckRunsEnabledChecksAndSkipsBuildtodaggerverse/go/tests/main.goand register it inTests.All.Motivation: the upcoming
z5labsmulti-arch GoApp pipeline needs to run the checks once and build per platform — exposingCheckindependently avoids re-running fmt/vet/lint/test N times.Closes #70.
Test plan
dagger -m daggerverse/go call ci --helplistscheckalongsiderun.dagger -m daggerverse/go/tests call ci-check-runs-enabled-checks-and-skips-build --go-image-tag=""passes.dagger -m daggerverse/go/tests call ci-run-vet-bad-aggregates --go-image-tag=""passes (error aggregation preserved throughRun→Check).dagger -m daggerverse/go/tests call ci-run-hello-all-stages --go-image-tag=""passes (build still runs fromRun).dagger -m daggerverse/go/tests call all --go-image-tag="" --parallel=0passes.🤖 Generated with Claude Code