Skip to main content
Add 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

Run this workflow on every pull request so changes to dependency pins, submodules, compiler settings, remappings, fixtures, and the workflow itself cannot bypass it. Commit dependency revisions and use the profile below. 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 in foundry.toml to separate unit and fuzz tests. Organize your tests into separate folders and create profiles for each test type:

Example foundry.toml

Profile Benefits

Use unit-assertions for unit tests, fuzz-assertions for fuzz tests, and assertions for the full suite.

Running Tests Locally with Profiles

You can set the FOUNDRY_PROFILE environment variable to use specific profiles:
If nothing is specified, the default profile is used. The TOML above was exercised with the local observation fixtures on November 17, 2026: 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

  1. Run tests on PR - Catch issues before merging
  2. Cover configuration changes - Run on every PR unless an exhaustive path filter is maintained
  3. Commit dependency pins - Reproduce the same library and submodule revisions
  4. Separate profiles - Keep assertion compilation separate from main project
  5. Pin versions - Update PCL and compiler pins together with test evidence
Learn More: