Repository navigation
Smoke-test the committed PHAR in CI - #26
Merged
Merged
Conversation
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>
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.
Packagist installs the committed
builds/quickpay, but CI only tested the source code. A broken or stale PHAR, for example after abox.jsonchange, would only show up for someone installing it. spatie/flare-cli runs a similar check.Changed
The
Tests (PHP 8.4)andTests (PHP 8.5)jobs gain a step that runs the committed PHAR outside the project, with an empty home folder:--versionmust match the newest release heading in the CHANGELOG, which catches a release that wasn't rebuilt;list --rawmust succeed and includeabout, andaboutmust run;payments:listwithout 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:main: 0.2.0 PHAR and CHANGELOGrelease/0.3.0: 0.3.0 PHAR and CHANGELOGNo files were written to the home folder.
🤖 Generated with Claude Code