Add Chainlink PoR rule #252
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
| name: CI | |
| on: | |
| push: | |
| pull_request: | |
| workflow_dispatch: | |
| env: | |
| FOUNDRY_PROFILE: ci | |
| jobs: | |
| check: | |
| strategy: | |
| fail-fast: true | |
| name: Foundry project | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.2 | |
| with: | |
| submodules: recursive | |
| - name: Install Foundry | |
| #v1.5.0 | |
| uses: foundry-rs/foundry-toolchain@50d5a8956f2e319df19e6b57539d7e2acb9f8c1e | |
| with: | |
| version: nightly | |
| - name: Show Forge version | |
| run: | | |
| forge --version | |
| - name: Run Forge build | |
| run: | | |
| forge build --sizes | |
| id: build | |
| - name: Run Forge tests | |
| run: | | |
| forge test -vvv | |
| id: test | |
| # The vendored ERC-3643 `Token.sol` pins `pragma solidity 0.8.30` exactly, so it cannot share | |
| # a compilation unit with our 0.8.36. `test/ERC3643Real/**` is in the default profile's `skip` | |
| # list and is built by `[profile.erc3643]` instead, which means the step above does NOT run it. | |
| # Both commands are required — see the Toolchain section of AGENTS.md / CLAUDE.md. | |
| - name: Run Forge tests (ERC-3643 profile) | |
| env: | |
| FOUNDRY_PROFILE: erc3643 | |
| run: | | |
| forge test -vvv | |
| id: test-erc3643 | |
| # `forge build` compiles the deployment scripts but never executes them, and the unit tests | |
| # call deploy() directly rather than run(), so neither exercises the broadcast context. That | |
| # gap let three scripts revert on every real deployment while CI stayed green | |
| # (CLAUDE_ANALYSIS_SCRIPT.md S-1/S-2). A test cannot cover this: Foundry refuses to combine a prank | |
| # with a broadcast, so `forge script` itself is the only faithful harness. No key or RPC is | |
| # needed -- without --broadcast this is a local simulation. | |
| - name: Run deployment scripts (dry run) | |
| run: | | |
| for s in script/*.s.sol; do | |
| name=$(basename "$s" .s.sol) | |
| echo "::group::$name" | |
| forge script "$s:$name" | |
| echo "::endgroup::" | |
| done | |
| id: scripts | |
| - name: Setup NodeJS 20.5.0 | |
| uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 #v4.4.0 | |
| with: | |
| node-version: 20.5.0 | |
| - name: Show NodeJS version | |
| run: npm --version | |
| - name: Install Project Dependencies | |
| run: npm install | |
| - name: Run Hardhat Test | |
| run: npx hardhat test |