This repository was archived by the owner on Apr 3, 2026. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -76,13 +76,26 @@ jobs:
7676 test-type : fork
7777 - workspace : utils
7878 test-type : fork
79+ # ---------------------------------------------------------------------------- #
80+ # COVERAGE #
81+ # ---------------------------------------------------------------------------- #
82+ # - workspace: airdrops
83+ # test-type: coverage
84+ - workspace : flow
85+ test-type : coverage
86+ - workspace : lockup
87+ test-type : coverage
88+ - workspace : utils
89+ test-type : coverage
7990 steps :
8091 - uses : actions/checkout@v5
92+ - uses : sablier-labs/devkit/actions/setup@main
93+ with :
94+ frozen-lockfile : false
95+ package-manager : bun
8196 - uses : foundry-rs/foundry-toolchain@v1
8297 with :
8398 version : " nightly"
84- - uses : oven-sh/setup-bun@v2
85- - run : bun install
8699
87100 - name : " Cache Foundry artifacts and Node.js dependencies"
88101 id : " cache-step"
@@ -104,16 +117,15 @@ jobs:
104117 uses : " smol-ninja/bulloak-toolchain@v1"
105118 with :
106119 skip-modifiers : true
107- tree-path : ${{ matrix.workspace }}/tests/{{ matrix.test-type }}/**/*.tree
120+ tree-path : ${{ matrix.workspace }}/tests/$ {{ matrix.test-type }}/**/*.tree
108121
109122 - name : Run tests
110123 if : steps.cache-step.outputs.cache-status != 'primary'
111124 env :
112125 FOUNDRY_PROFILE : test-optimized
113126 run : | # shell
114- if [ "${{ matrix.test-type }}" == "fork" ]; then
115- export FOUNDRY_FUZZ_RUNS=20
116- fi
117- forge test \
118- --match-path "tests/${{ matrix.test-type }}/**/*.sol" \
119- --root ${{ matrix.workspace }}
127+ case "${{ matrix.test-type }}" in
128+ unit|integration) export FOUNDRY_FUZZ_RUNS=2000 ;;
129+ fork|coverage) export FOUNDRY_FUZZ_RUNS=20 ;;
130+ esac
131+ just test-${{ matrix.test-type }} ${{ matrix.workspace }}
Original file line number Diff line number Diff line change 5252[profile .test-optimized ]
5353 src = " tests"
5454
55- [profile .test-optimized .fuzz ]
56- runs = 2000
57-
5855 # ---------------------------------------------------------------------------- #
5956 # OTHER CONFIG #
6057 # ---------------------------------------------------------------------------- #
Original file line number Diff line number Diff line change @@ -41,12 +41,32 @@ alias b := build
4141
4242[group (" test" )]
4343test workspace path = " tests/**/*.sol":
44- forge test --root {{ workspace }} --match-path " {{ path }} "
45- alias test-forge := test
44+ forge test --root {{ workspace }} \
45+ - -match-path " {{ path }} "
4646
47+ [group (" test" )]
48+ test-fork workspace : (test workspace " tests/fork/**/*.sol" )
49+
50+ [group (" test" )]
51+ test-integration workspace : (test workspace " tests/integration/**/*.sol" )
52+
53+ [group (" test" )]
54+ test-invariant workspace : (test workspace " tests/invariant/**/*.sol" )
55+
56+ [group (" test" )]
57+ test-unit workspace : (test workspace " tests/unit/**/*.sol" )
58+
59+ [group (" test" )]
4760test-bulloak workspace :
4861 bulloak check --tree-path " {{ workspace }} /tests/**/*.tree"
4962
63+ [group (" test" )]
64+ test-coverage workspace :
65+ forge coverage --root {{ workspace }} \
66+ - -ir-minimum \
67+ - -match-path " tests/{fork,integration,unit}/**/*.sol" \
68+ - -report lcov
69+
5070# ---------------------------------------------------------------------------- #
5171# PRIVATE SCRIPTS #
5272# ---------------------------------------------------------------------------- #
You can’t perform that action at this time.
0 commit comments