docs(scale): publish what a trade costs, measured on-chain #2
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 | |
| # Deliberately narrow: only the checks that are deterministic and that were verified | |
| # green locally before this file existed. A red badge is worse than no badge, so the | |
| # workflow does not attempt the Next.js production build — that step copies submission | |
| # artifacts out of docs/ and is better exercised by a real deploy than by a runner. | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| workflow_dispatch: | |
| jobs: | |
| contracts: | |
| name: Contracts — build, test, coverage | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - uses: foundry-rs/foundry-toolchain@v1 | |
| - name: Build | |
| run: forge build --sizes | |
| - name: Test | |
| run: forge test -vv | |
| - name: Coverage | |
| run: | | |
| forge coverage --no-match-coverage "(script|test)" --report summary \ | |
| | tee coverage.txt | |
| echo '### Solidity coverage' >> "$GITHUB_STEP_SUMMARY" | |
| echo '```' >> "$GITHUB_STEP_SUMMARY" | |
| grep -E '^\| (File|src/|Total)' coverage.txt >> "$GITHUB_STEP_SUMMARY" | |
| echo '```' >> "$GITHUB_STEP_SUMMARY" | |
| - name: Gas | |
| run: | | |
| forge test --gas-report > gas.txt 2>&1 || true | |
| echo '### Gas' >> "$GITHUB_STEP_SUMMARY" | |
| echo '```' >> "$GITHUB_STEP_SUMMARY" | |
| sed -n '/ReceivableNote/,/^$/p' gas.txt | head -30 >> "$GITHUB_STEP_SUMMARY" | |
| echo '```' >> "$GITHUB_STEP_SUMMARY" | |
| dashboard: | |
| name: Dashboard — types and lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: npm | |
| cache-dependency-path: dashboard/package-lock.json | |
| - run: npm ci | |
| working-directory: dashboard | |
| - run: npx tsc --noEmit | |
| working-directory: dashboard | |
| - run: npx eslint . | |
| working-directory: dashboard | |
| relayer: | |
| name: Relayer — types | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: npm | |
| cache-dependency-path: relayer/package-lock.json | |
| - run: npm ci | |
| working-directory: relayer | |
| - run: npx tsc --noEmit | |
| working-directory: relayer |