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 test with the assertions profile on matching pull requests or manual dispatch. It installs the latest pcl. Pin a version for reproducible runs.
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:
Best Practices
- Run tests on PR - Catch issues before merging
- Use path filters - Only run tests when relevant files change
- Cache dependencies - Speed up CI runs (Foundry toolchain action handles this)
- Separate profiles - Keep assertion compilation separate from main project
- Pin versions - Consider pinning the
pclversion for reproducibility
- 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

