Continuous validation
Continuous validation checks that the GitHub Action still works for supported runner environments and that its committed distribution matches its source. Pull requests receive both behavior checks and a package-integrity check; pushes to master and manual runs receive the behavior checks as well. See Action packaging and maintenance for the wider release context, Embedded pnpm bootstrap artifacts for the bootstrap data that the tests exercise, and Action runtime orchestration for the behavior under test.
Validation system
The validation system uses two GitHub workflows with different duties. The test workflow checks the action as a user would run it, while the pull-request check tests the source and rebuilds the shipped bundle before it rejects stale generated output.
The workflows share a key goal: a change is acceptable only when the action behaves correctly and the packaged entry point reflects the source that produced it.
Workflow triggers
The test workflow runs for pull requests, pushes to master, and manual dispatch. This gives proposed changes early feedback and keeps the main branch checked after merge. The package check runs only for pull requests because it guards the review boundary where source and generated distribution must agree. .github/…/test.yaml• L1-8, .github/…/pr-check.yaml• L1-3
The pull-request workflow cancels an older run for the same pull request when a newer commit arrives. It uses read-only contents access, so its role is limited to inspection and validation. .github/…/pr-check.yaml• L5-10
References: .github/…/test.yaml• L1-8 .github/…/pr-check.yaml• L1-10
Validation stages
The action tests move from basic setup to user-facing behavior. Each stage checks a contract that can fail without being visible in a simple build.
| Stage | Confidence provided |
|---|---|
| Cross-platform smoke checks | The requested pnpm version and command paths work on Ubuntu, macOS, and Windows. A fresh project can install a package. |
| Manifest version checks | The action respects package manager declarations and keeps explicit version input separate from strict manifest policy. |
| Standalone checks | The action works without depending on the runner's normal Node setup. Windows also checks that a self-updated pnpm command is not hidden by an older path entry. |
| Shared-store checks | Repeated setup can use the same pnpm store and keep the requested version available. |
| Cache and install checks | Cache setup uses the same pnpm version as dependency work, and supported install request forms complete. |
| Windows destination checks | A destination path with spaces works for both normal and standalone setup, including the action's reported command path. |
| Distribution check | The committed dist/index.js is the result of the current source build. |
References: .github/…/test.yaml• L10-466 .github/…/pr-check.yaml• L12-35
Action behavior validation
The test workflow treats the repository checkout as a local action and runs it through realistic job inputs. The checks focus on contracts that affect later workflow steps: version selection, command exposure, dependency installation, standalone use, shared-store reuse, cache preparation, and destination handling. These are the public runtime effects described in Action runtime orchestration.
Runner coverage
The smoke matrix covers Ubuntu, macOS, and Windows. Ubuntu checks pnpm versions 9, 10, 11, and 12, while one Ubuntu case uses a custom destination. The workflow confirms that normal command lookup and the action's explicit command path resolve to the requested version. A separate Windows matrix also checks destinations that contain spaces for normal and standalone setup. .github/…/test.yaml• L14-96, .github/…/test.yaml• L426-466
This coverage protects the handoff from pnpm provisioning to later workflow steps. A successful setup must not only install pnpm; it must make the selected version available through the path that users and the action outputs expose.
References: .github/…/test.yaml• L14-96 .github/…/test.yaml• L426-466 action.yml• L6-16 action.yml• L34-42
Manifest and version policy
Manifest checks cover the supported ways a project can declare pnpm. They test exact versions and ranges through both packageManager and devEngines, including strict onFail behavior. One case passes an explicit action version and confirms that the action does not replace the project's strict policy with a permissive setting. .github/…/test.yaml• L98-181
These checks protect the version contract described in pnpm provisioning. They distinguish the version that the action must install from policy that the project expects pnpm itself to enforce.
References: .github/…/test.yaml• L98-181 action.yml• L7-10 action.yml• L26-29
Standalone and self-update behavior
Standalone validation checks that pnpm can run in a mode that does not rely on the runner's normal Node runtime. It also checks that a Windows self-update keeps the requested command first on the path when the action runs an install feature from the newer pnpm version. Reaching the final version check proves that the self-updated command remains available during and after setup. .github/…/test.yaml• L183-226, .github/…/test.yaml• L290-336
This protects both bootstrap paths described in Embedded pnpm bootstrap artifacts. The normal and standalone paths must lead to the same user-facing result: later commands run with the requested pnpm release.
References: .github/…/test.yaml• L183-226 .github/…/test.yaml• L290-336 action.yml• L30-33 src/index.ts• L18-31
Shared-store and cache behavior
The shared-store checks run setup twice with the same destination and confirm that the second run can use the store populated by the first. This protects repeated action use inside a workflow and keeps version selection aligned with the store used by pnpm. .github/…/test.yaml• L228-288
The cache check uses manifests that pin a different pnpm major from the bootstrap and then verifies that the store path used by pnpm exists. This guards the link between version selection, dependency installation, and the later cache-save phase. .github/…/test.yaml• L338-384
References: .github/…/test.yaml• L228-288 .github/…/test.yaml• L338-384 src/index.ts• L23-36 action.yml• L14-25
Install behavior
The install matrix checks both the default no-op form and a global install request. Together with the smoke install, it confirms that the action can hand a working pnpm command to common dependency workflows. .github/…/test.yaml• L386-424
References: .github/…/test.yaml• L386-424 action.yml• L14-25
Pull-request package validation
The pull-request check first runs the repository tests, then validates the artifact that GitHub Actions executes. It rebuilds dist/index.js from the current source and fails if that build changes the committed file.
Distribution consistency
The distribution check makes generated output part of the pull-request contract. A source change that is not reflected in dist/index.js fails review even if the source itself looks correct, while a generated-file change without a matching source build is also exposed by the same comparison. .github/…/pr-check.yaml• L18-35, package.json• L3-8
The check complements the behavior workflow rather than replacing it. The test workflow asks whether the action works on runners; the distribution workflow asks whether the committed action entry point contains the reviewed behavior.
References: .github/…/pr-check.yaml• L12-35 package.json• L3-8 action.yml• L40-42
Validation relationships
The workflows cover different points in the action lifecycle. Behavior tests run the action and observe its public effects, while the package check verifies that the file named by the action metadata is reproducible from source. Bootstrap artifact refreshes sit upstream of both: they change the first pnpm install and therefore need behavior validation and a current package build. Embedded pnpm bootstrap artifacts describes that upstream relationship.
This diagram shows how a pull request moves through the two validation paths.
flowchart LR
A[Pull request change] --> B[Test workflow]
A --> C[Pull-request package check]
B --> D[Runner behavior result]
C --> E[Committed distribution result]
D --> F{Both pass?}
E --> F
F -- Yes --> G[Change is ready for review]
F -- No --> H[Change needs correction]
Change to validation contract
A change to an action input, output, bootstrap path, cache path, destination path, or install request can make a workflow check stale even when the workflow still runs. The validation matrix is therefore a map of the action's public contracts, not just a list of commands. When the contract changes, update the relevant scenario and keep the distribution check in the same review path.
References: .github/…/test.yaml• L14-466 .github/…/pr-check.yaml• L12-35 action.yml• L6-42
Change checklist
When these files or sections are changed, remember to consider these:
- When action inputs or outputs change, check the smoke, manifest, standalone, shared-store, cache, install, and destination scenarios that use the affected contract.
- When version selection or bootstrap behavior changes, keep the manifest cases aligned with the supported declaration forms and test both normal and standalone paths.
- When command path or destination behavior changes, retain cross-platform checks, the explicit
bin_destassertion, and the Windows path-with-spaces scenarios. - When shared-store or cache ordering changes, keep repeated setup tied to the same store and keep the store-path check tied to the pnpm version that performs the install.
- When source or build settings change, regenerate dist/index.js and confirm the pull-request check still tests the source and compares the shipped file.
- When workflow triggers or concurrency rules change, confirm that pull requests still receive both behavior and distribution checks.
Important failure modes
| Trigger | Consequence | Guard |
|---|---|---|
The requested pnpm command is not first on PATH. | A later step can use the bootstrap version instead of the requested version. | Keep the cross-platform version and bin_dest checks in the smoke matrix. |
A manifest declaration is handled as an exact version when it is a range, or strict onFail policy is overwritten. | Projects can run with the wrong pnpm version or lose their intended policy. | Keep the exact, range, and explicit-version manifest cases. |
| Standalone Windows path handling selects an older command during self-update. | An install can fail on a feature that the requested pnpm version supports. | Keep the Windows self-update scenario with a newer-pnpm-only install option. |
| Repeated setup does not reuse the configured store. | A later action run can miss packages that the first run populated, or use a different store than the workflow expects. | Keep the two-install shared-store scenario and its reuse marker check. |
| Cache setup uses a store path from a different pnpm major than the install. | Cache saving can fail because the expected store directory does not exist. | Keep the pinned-manifest cache scenario and its on-disk store check. |
| A destination path with spaces is parsed incorrectly. | Windows setup or the reported command path can point to the wrong location. | Keep the Windows destination matrix for normal and standalone setup. |
| dist/index.js is not rebuilt after a source change. | GitHub Actions can execute behavior that differs from the reviewed source. | Require the pull-request test, build, and clean git diff check to pass. |
Key files
| File | Why to read it |
|---|---|
| .github/…/test.yaml | Defines the behavior checks for runner platforms, version declarations, standalone use, shared-store reuse, caching, install requests, and destination paths. |
| .github/…/pr-check.yaml | Defines the pull-request test, build, and distribution check that keeps the committed action bundle aligned with source. |
| action.yml | Defines the public action entry point, inputs, outputs, and the main and post lifecycle used by the tests. |
| package.json | Defines the test and build commands that the pull-request workflow runs. |
| src/index.ts | Shows the high-level action lifecycle that the workflow tests observe. |
| scripts/update-bootstrap.mjs | Defines the refresh path for embedded bootstrap data whose changes need validation. |