feat(ci): smoke-test the action surface on every PR#74
Merged
Conversation
Adds a new `smoke-action` job to ci.yml that invokes the public
action.yml + src/index.js wrapper the way a user's
`uses: buildrush/setup-php@v1` would — previously not covered
anywhere in CI.
Coverage gap this closes:
- ci.yml::pipeline exercises phpup as a CLI inside bare-ubuntu
containers (bundle build + fixture probe). It bypasses the
composite-action entry point entirely.
- A PR that broke action.yml (typo an input name, wrong output
binding, etc.) or src/index.js (input parsing regression,
misresolved cache path) would pass every existing job and still
ship a broken action.
How the new job runs the PR's phpup, not a released one:
src/index.js:runMain() checks existsSync($RUNNER_TOOL_CACHE/
buildrush-bin/phpup) before hitting the network. We `go build`
the PR's phpup binary directly into that cache path, then invoke
`uses: ./` — the wrapper finds the binary, skips the release
download, and the end-to-end path is: PR's action.yml → PR's
src/index.js → PR's phpup. Zero changes to src/index.js were
needed; the cache-hit path was the right hook.
Matrix is deliberately narrower than `pipeline`:
- 2 OS (jammy, noble) × 2 arch (amd64, arm64) × 1 PHP (8.4) = 4 cells
- Wrapper is OS-invariant and arch-variant; 4 cells catch the
real regressions without multiplying the existing 20-cell
`pipeline` cost.
Assertions per cell:
- php -v succeeds (smoke)
- extension_loaded("redis") + extension_loaded("intl")
(extensions input was honored + extensions loaded at runtime)
- ini_get("memory_limit") == "256M"
(ini-values input was parsed + applied)
Wiring:
- smoke-action needs: pipeline (fails fast if the CLI side broke)
- publish needs: [pipeline, smoke-action] (a broken wrapper on
main would otherwise publish a bundle the action can't use)
v2 drop-in compat (the coverage lost when compat-harness.yml was
deleted in PR #60) is deferred to a follow-up PR — this one keeps
the change surface small and easy to revert.
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
Closes the primary gap surfaced by the post-unification pipeline audit: the public action surface (
action.yml+src/index.js) has no PR-gated test. Today, a PR that breaks the composite-action glue — typo in anaction.ymlinput, regression insrc/index.js's input parsing — passes all 22 CI jobs and still ships a broken action.This PR adds a 4-cell
smoke-actionmatrix that invokes the wrapper end-to-end the way a consumer does.How it runs the PR's phpup, not a released one
src/index.js:runMain()checksexistsSync($RUNNER_TOOL_CACHE/buildrush-bin/phpup)before hitting the network (line 165). If that path exists, it uses the binary and skips bothresolveReleaseTaganddownloadFile.The new job builds phpup from PR HEAD directly into that cache path, then does
uses: ./. End-to-end: PR'saction.yml→ PR'ssrc/index.js→ PR's phpup binary. Zero changes tosrc/index.js— the existing cache-hit path is the right hook.Matrix
Deliberately narrower than
pipeline(20 cells): the wrapper is OS-invariant and arch-variant; 4 cells catch wrapper regressions without multiplying CI time.Assertions per cell
php -vsucceeds (smoke)extension_loaded("redis")+extension_loaded("intl")(extensions input honored)ini_get("memory_limit") == "256M"(ini-values input honored)Wiring
smoke-action: needs: pipeline— fails fast if the CLI side broke.publish: needs: [pipeline, smoke-action]— a broken wrapper on main would otherwise publish a bundle the action can't use.What's deferred to a follow-up PR
v2 drop-in compat (diff against
shivammathur/setup-php@v2, usingdocs/compat-matrix.mdallowlist) — the coverage lost whencompat-harness.ymlwas deleted in PR #60. Keeping this PR small and easy to revert; v2 compat gets its own PR oncesmoke-actionis proven stable.Test plan
make checkgreen locallysmoke-actioncells + the existing 22 jobs)action.ymlinput name on a throwaway branch; confirmsmoke-actiongoes red where it would previously have been green