This repository was archived by the owner on Apr 3, 2026. It is now read-only.
ci: fix syntax for bulloak-toolchain #20
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 # | |
| # ---------------------------------------------------------------------------- # | |
| # - test-type: unit | |
| # workspace: airdrops | |
| - test-type: unit | |
| workspace: lockup | |
| # ---------------------------------------------------------------------------- # | |
| # INTEGRATION # | |
| # ---------------------------------------------------------------------------- # | |
| # - test-type: integration | |
| # workspace: airdrops | |
| - test-type: integration | |
| workspace: flow | |
| - test-type: integration | |
| workspace: lockup | |
| - test-type: integration | |
| workspace: utils | |
| # ---------------------------------------------------------------------------- # | |
| # INVARIANT # | |
| # ---------------------------------------------------------------------------- # | |
| - test-type: invariant | |
| workspace: flow | |
| - test-type: invariant | |
| workspace: lockup | |
| - test-type: invariant | |
| workspace: utils | |
| # ---------------------------------------------------------------------------- # | |
| # FORK # | |
| # ---------------------------------------------------------------------------- # | |
| # - test-type: fork | |
| # workspace: airdrops | |
| - test-type: fork | |
| workspace: flow | |
| - test-type: fork | |
| workspace: lockup | |
| - test-type: fork | |
| workspace: utils | |
| # ---------------------------------------------------------------------------- # | |
| # COVERAGE # | |
| # ---------------------------------------------------------------------------- # | |
| # - test-type: coverage | |
| # workspace: airdrops | |
| - test-type: coverage | |
| workspace: flow | |
| - test-type: coverage | |
| workspace: lockup | |
| - test-type: coverage | |
| workspace: utils | |
| 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: "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 | |
| sol-files-path: ${{ matrix.workspace }}/**/*.sol | |
| - 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' && matrix.test-type != 'integration' | |
| uses: "smol-ninja/bulloak-toolchain@v1" | |
| with: | |
| skip-modifiers: true | |
| tree-path: ${{ matrix.workspace }}/tests/${{ matrix.test-type }} | |
| - name: Run tests | |
| if: steps.cache-step.outputs.cache-status != 'primary' | |
| env: | |
| FOUNDRY_PROFILE: test-optimized | |
| run: | #shell | |
| case "${{ matrix.test-type }}" in | |
| unit|integration) export FOUNDRY_FUZZ_RUNS=2000 ;; | |
| fork|coverage) export FOUNDRY_FUZZ_RUNS=20 ;; | |
| esac | |
| just test-${{ matrix.test-type }} ${{ matrix.workspace }} |