Skip to content

Smoke-test the committed PHAR in CI - #26

Merged
tehwave merged 1 commit into
mainfrom
ci/smoke-test-phar
Nov 23, 2026
Merged

tehwave merged 1 commit into
mainfrom
ci/smoke-test-phar

Conversation

@tehwave

@tehwave tehwave commented Nov 23, 2026

Copy link
Copy Markdown
Owner

Packagist installs the committed builds/quickpay, but CI only tested the source code. A broken or stale PHAR, for example after a box.json change, would only show up for someone installing it. spatie/flare-cli runs a similar check.

Changed

The Tests (PHP 8.4) and Tests (PHP 8.5) jobs gain a step that runs the committed PHAR outside the project, with an empty home folder:

  • --version must match the newest release heading in the CHANGELOG, which catches a release that wasn't rebuilt;
  • list --raw must succeed and include about, and about must run;
  • payments:list without a merchant must fail with an error message, not a crash.

The step checks only what holds for any release, so it passes between releases, when the committed PHAR is the last release's.

Testing

I ran the step's script locally with bash -eo pipefail, as GitHub does:

Case Result
main: 0.2.0 PHAR and CHANGELOG passes
release/0.3.0: 0.3.0 PHAR and CHANGELOG passes
0.2.0 PHAR with the 0.3.0 CHANGELOG fails
truncated PHAR fails

No files were written to the home folder.

🤖 Generated with Claude Code

Packagist installs builds/quickpay, but CI only tested the source. The
test job now checks, on each PHP version, that the committed PHAR is the
newest release in the CHANGELOG, starts outside the project with an
empty home folder, lists its commands, runs `about`, and fails cleanly
rather than crashing when no merchant is set up.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@tehwave
tehwave merged commit e925759 into main Nov 23, 2026
7 checks passed
@tehwave
tehwave deleted the ci/smoke-test-phar branch November 23, 2026 20:43
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