docs: document the Pest testing workflow - #810
Open
somethingwithproof wants to merge 3 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR documents Thold’s Pest-based unit testing workflow (using Cacti’s Composer toolchain) and hardens CI against transient network/package failures by bounding retry/timeout behavior in GitHub Actions workflows.
Changes:
- Added a dedicated testing/contribution guide describing Pest usage and the “no plugin-local Composer/vendor” policy.
- Linked the testing guide from the main README for developer discoverability.
- Updated CI workflows to run only against the pinned Cacti release and to bound
apt-get update, Docker builds, andcomposer installretries.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
README.md |
Adds a “Development and testing” section linking to the new testing guide and clarifying the shared Cacti Composer toolchain policy. |
docs/TESTING.md |
Introduces the Pest testing and contribution workflow documentation, including local commands and PR checklist. |
.github/workflows/plugin-ci-workflow.yml |
Limits integration tests to the pinned Cacti release and adds bounded retries/timeouts for package refresh and composer installs. |
.github/workflows/pest-tests.yml |
Adds bounded retry logic to building the pinned Cacti Docker test images for Pest runs. |
Suppressed comments (1)
.github/workflows/pest-tests.yml:76
- This line ends with
&& \and appears to include trailing whitespace after the backslash. In shell, a backslash must be the final character on the line to act as a line-continuation, so this is error-prone and can behave unexpectedly. You can drop the backslash entirely because a newline after&&is valid shell syntax.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| To run one test file while developing: | ||
|
|
||
| ```console | ||
| composer test -- --configuration=plugins/thold/phpunit.xml plugins/thold/tests/Unit/TholdRpnCdefTest.php |
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.
What
Why
Thold uses Pest through Cacti's Composer toolchain and must not carry a plugin-local Composer manifest or vendor tree. The repository should make that policy and the supported local commands explicit. The integration workflow also needs bounded package-network operations so transient runner failures do not hang pull requests indefinitely.
Impact
Documentation and CI workflow maintenance only. No plugin runtime behavior changes. The existing phpunit.xml remains because Pest reads it as compatibility configuration.
Checks