This repository was archived by the owner on Apr 3, 2026. It is now read-only.
ci: test bulloak #18
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" | |
| concurrency: | |
| cancel-in-progress: true | |
| group: ${{github.workflow}}-${{github.ref}} | |
| env: | |
| FOUNDRY_DISABLE_NIGHTLY_WARNING: "true" | |
| on: | |
| pull_request: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - "main" | |
| - "staging" | |
| jobs: | |
| check: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: sablier-labs/devkit/actions/setup@main | |
| with: | |
| frozen-lockfile: false | |
| package-manager: bun | |
| - uses: foundry-rs/foundry-toolchain@v1 | |
| with: | |
| version: "nightly" | |
| - name: Run all code checks | |
| run: just full-check | |
| test: | |
| needs: check | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| # ---------------------------------------------------------------------------- # | |
| # Unit # | |
| # ---------------------------------------------------------------------------- # | |
| # - workspace: airdrops | |
| # test-type: unit | |
| - workspace: lockup | |
| test-type: unit | |
| # ---------------------------------------------------------------------------- # | |
| # INTEGRATION # | |
| # ---------------------------------------------------------------------------- # | |
| # - workspace: airdrops | |
| # test-type: integration | |
| - workspace: flow | |
| test-type: integration | |
| - workspace: lockup | |
| test-type: integration | |
| - workspace: utils | |
| test-type: integration | |
| # ---------------------------------------------------------------------------- # | |
| # INVARIANT # | |
| # ---------------------------------------------------------------------------- # | |
| - workspace: flow | |
| test-type: invariant | |
| - workspace: lockup | |
| test-type: invariant | |
| - workspace: utils | |
| test-type: invariant | |
| # ---------------------------------------------------------------------------- # | |
| # FORK # | |
| # ---------------------------------------------------------------------------- # | |
| # - workspace: airdrops | |
| # test-type: fork | |
| - workspace: flow | |
| test-type: fork | |
| - workspace: lockup | |
| test-type: fork | |
| - workspace: utils | |
| test-type: fork | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: foundry-rs/foundry-toolchain@v1 | |
| with: | |
| version: "nightly" | |
| - uses: oven-sh/setup-bun@v2 | |
| - run: bun install | |
| - name: "Cache Foundry artifacts and Node.js dependencies" | |
| id: "cache-step" | |
| uses: "sablier-labs/gha-utils/.github/actions/evm-cache@main" | |
| with: | |
| cache-path: | | |
| node_modules | |
| ${{ matrix.workspace }}/cache | |
| ${{ matrix.workspace }}/out-optimized | |
| - name: Build contracts | |
| if: steps.cache-step.outputs.cache-status != 'primary' | |
| env: | |
| FOUNDRY_PROFILE: optimized | |
| run: forge build --root ${{ matrix.workspace }} | |
| - name: Run Bulloak check | |
| if: steps.cache-step.outputs.cache-status != 'primary' | |
| uses: "smol-ninja/bulloak-toolchain@v1" | |
| with: | |
| skip-modifiers: true | |
| tree-path: ${{ matrix.workspace }}/tests/{{ matrix.test-type }}/**/*.tree | |
| - name: Run tests | |
| if: steps.cache-step.outputs.cache-status != 'primary' | |
| env: | |
| FOUNDRY_PROFILE: test-optimized | |
| run: | #shell | |
| if [ "${{ matrix.test-type }}" == "fork" ]; then | |
| export FOUNDRY_FUZZ_RUNS=20 | |
| fi | |
| forge test \ | |
| --match-path "tests/${{ matrix.test-type }}/**/*.sol" \ | |
| --root ${{ matrix.workspace }} |