Skip to content

feat(ci): smoke-test the action surface on every PR#74

Merged
phramz merged 1 commit into
mainfrom
feat/smoke-action-surface
Apr 24, 2026
Merged

feat(ci): smoke-test the action surface on every PR#74
phramz merged 1 commit into
mainfrom
feat/smoke-action-surface

Conversation

@phramz

@phramz phramz commented Apr 24, 2026

Copy link
Copy Markdown
Contributor

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 an action.yml input, regression in src/index.js's input parsing — passes all 22 CI jobs and still ships a broken action.

This PR adds a 4-cell smoke-action matrix 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() checks existsSync($RUNNER_TOOL_CACHE/buildrush-bin/phpup) before hitting the network (line 165). If that path exists, it uses the binary and skips both resolveReleaseTag and downloadFile.

The new job builds phpup from PR HEAD directly into that cache path, then does uses: ./. End-to-end: PR's action.yml → PR's src/index.js → PR's phpup binary. Zero changes to src/index.js — the existing cache-hit path is the right hook.

Matrix

OS arch runner PHP
jammy amd64 ubuntu-22.04 8.4
noble amd64 ubuntu-24.04 8.4
jammy arm64 ubuntu-22.04-arm 8.4
noble arm64 ubuntu-24.04-arm 8.4

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 -v succeeds (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, using docs/compat-matrix.md allowlist) — the coverage lost when compat-harness.yml was deleted in PR #60. Keeping this PR small and easy to revert; v2 compat gets its own PR once smoke-action is proven stable.

Test plan

  • make check green locally
  • CI green on this PR (all 4 smoke-action cells + the existing 22 jobs)
  • After merge: break an action.yml input name on a throwaway branch; confirm smoke-action goes red where it would previously have been green

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.
@phramz
phramz merged commit eeb536b into main Apr 24, 2026
28 checks passed
@phramz
phramz deleted the feat/smoke-action-surface branch April 24, 2026 12:53
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