pcl test to your CI workflow to check assertions before merging.
This workflow validates assertion logic. Add separate checks for your Ethereum guard wiring, upgrade compatibility, and recovery behavior; passing pcl test does not prove the live submission route. See Testing Strategy.
GitHub Actions Example
pcl supplies its test runner and obtains the configured Solidity compiler; this recipe does not require a moving Foundry nightly.
The CLI was exercised locally on Linux ARM64. The documentation repository also ran its observation fixtures successfully on GitHub-hosted Ubuntu x86-64 with this release asset and compiler pin. Your workflow still needs to validate its own dependencies, profiles, and tests.
Foundry Profile Configuration
Use profiles infoundry.toml to separate unit and fuzz tests.
Recommended Profile Structure
Organize your tests into separate folders and create profiles for each test type:Example foundry.toml
Profile Benefits
Useunit-assertions for unit tests, fuzz-assertions for fuzz tests, and assertions for the full suite.
Running Tests Locally with Profiles
You can set theFOUNDRY_PROFILE environment variable to use specific profiles:
assertions ran 14 tests, unit-assertions ran 10, and fuzz-assertions ran four with 256 runs each. All passed using PCL 1.9.0 and Solidity 0.8.29.
Best Practices
- Run tests on PR - Catch issues before merging
- Cover configuration changes - Run on every PR unless an exhaustive path filter is maintained
- Commit dependency pins - Reproduce the same library and submodule revisions
- Separate profiles - Keep assertion compilation separate from main project
- Pin versions - Update PCL and compiler pins together with test evidence
- Testing Assertions - Basic testing guide
- Fuzz Testing - Test with random inputs
- Review Backtesting Results - Review the automatic backtest attached to a platform release
- Foundry Book - Testing

