Add TEST_SETUP_COMMANDS and CODE_GEN_COMMANDS inputs to Go CI actions#183
Merged
Add TEST_SETUP_COMMANDS and CODE_GEN_COMMANDS inputs to Go CI actions#183
Conversation
There was a problem hiding this comment.
Pull request overview
Adds optional extensibility inputs to the repo’s composite Go CI actions so consuming workflows can run custom commands at specific pipeline points (code generation between buf generate and go mod tidy, and test setup between build and test), plus surfaces previously-supported pass-through inputs.
Changes:
- Add
CODE_GEN_COMMANDStogo/depsand pass it through fromgo/buildandgo/build-and-test. - Add
TEST_SETUP_COMMANDStogo/build-and-testto run custom setup between build and test. - Surface
PARALLELandMOCKERY_INSTALL_VERSIONingo/build-and-testand pass them to sub-actions.
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| go/deps/action.yml | Adds CODE_GEN_COMMANDS input and executes it after buf generate. |
| go/build/action.yml | Adds MOCKERY_INSTALL_VERSION + CODE_GEN_COMMANDS inputs and passes them to go/deps. |
| go/build-and-test/action.yml | Adds TEST_SETUP_COMMANDS, PARALLEL, MOCKERY_INSTALL_VERSION, CODE_GEN_COMMANDS and wires them through to sub-steps/actions. |
| .gitignore | Ignores docs/ directory for local planning docs. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
chriskarlin
approved these changes
Mar 23, 2026
c8eb327 to
30c85ea
Compare
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
Adds extensibility inputs to Go CI actions so consumers can inject custom commands at key pipeline stages:
CODE_GEN_COMMANDS(ingo/depsandgo/build) — runs betweenbuf generateandgo mod tidy. For code generation tools like sqlc, wire, or ent that produce importable Go files needed before vendoring.TEST_SETUP_COMMANDS(ingo/build-and-test) — runs between build and test steps. For DB migrations, seed data, config generation, or other pre-test setup.PARALLELandMOCKERY_INSTALL_VERSION— pass-through inputs ingo/build-and-testthat were already supported by sub-actions but not surfaced in the combined action.All inputs are optional with empty-string defaults — no breaking changes.
Users specify these as shell script bodies:
Also adds a composite actions reference table to the README documenting all available actions in this repo.
Validated on consuming repos (pre-rebase)
Files changed
go/build-and-test/action.ymlTEST_SETUP_COMMANDS,CODE_GEN_COMMANDS,PARALLEL,MOCKERY_INSTALL_VERSIONinputsgo/build/action.ymlCODE_GEN_COMMANDS,MOCKERY_INSTALL_VERSIONinputs, pass through togo/depsgo/deps/action.ymlCODE_GEN_COMMANDSinput, execute between buf generate and go mod tidyREADME.mdTest plan