99
99
RPC_ENDPOINT_MAINNET : ${{ secrets.JUNO_ENDPOINT_MAINNET }}
100
100
MLIR_SYS_170_PREFIX : /usr/lib/llvm-17/
101
101
TABLEGEN_170_PREFIX : /usr/lib/llvm-17/
102
+ TEST_COLLECT_COVERAGE : 1
102
103
strategy :
103
104
fail-fast : false
104
105
matrix :
@@ -162,6 +163,13 @@ jobs:
162
163
- name : Run tests (${{ matrix.target }})
163
164
run : make ${{ matrix.target }}
164
165
166
+ - name : Save coverage report
167
+ if : steps.restore-report.outputs.cache-hit != 'true' && ${{ matrix.target }} != 'test-doctest'
168
+ uses : actions/cache/save@v3
169
+ with :
170
+ path : lcov-${{ matrix.target }}.info
171
+ key : coverage-cache-${{ github.sha }}-${{ matrix.target }}
172
+
165
173
coverage :
166
174
name : Generate and upload coverage report
167
175
runs-on : ubuntu-latest
@@ -171,48 +179,30 @@ jobs:
171
179
- name : Checkout
172
180
uses : actions/checkout@v3
173
181
174
- - name : Install Rust nightly
175
- uses : dtolnay/rust-toolchain@master
176
- with :
177
- toolchain : nightly
178
-
179
- - uses : Swatinem/rust-cache@v2
180
- with :
181
- cache-on-failure : true
182
-
183
- - name : Cache coverage report
182
+ - name : Fetch coverage report for test-cairo-1
184
183
id : restore-report
185
184
uses : actions/cache/restore@v3
186
185
with :
187
- path : lcov.info
188
- key : coverage-cache-${{ github.sha }}
186
+ path : lcov-test-cairo-1 .info
187
+ key : coverage-cache-${{ github.sha }}-test-cairo-1
189
188
190
- - name : Python3 Build
191
- uses : actions/setup-python@v4
192
- with :
193
- python-version : ' 3.9'
194
- cache : ' pip'
195
- - uses : Swatinem/rust-cache@v2
189
+ - name : Fetch coverage report for test-cairo-2
190
+ id : restore-report
191
+ uses : actions/cache/restore@v3
196
192
with :
197
- cache-on-failure : true
198
-
199
- - name : Install deps
200
- run : make deps
193
+ path : lcov-test-cairo-2.info
194
+ key : coverage-cache-${{ github.sha }}-test-cairo-2
201
195
202
- - name : Generate coverage report
203
- if : steps.restore-report.outputs.cache-hit != 'true'
204
- run : make coverage-report
205
-
206
- - name : Save coverage report
207
- if : steps.restore-report.outputs.cache-hit != 'true'
208
- uses : actions/cache/save@v3
196
+ - name : Fetch coverage report for test-cairo-native
197
+ id : restore-report
198
+ uses : actions/cache/restore@v3
209
199
with :
210
- path : lcov.info
211
- key : coverage-cache-${{ github.sha }}
200
+ path : lcov-test-cairo-native .info
201
+ key : coverage-cache-${{ github.sha }}-test-cairo-native
212
202
213
203
- name : Upload coverage to codecov.io
214
204
uses : codecov/codecov-action@v3
215
205
with :
216
206
fail_ci_if_error : true
217
207
token : ${{ secrets.CODECOV_TOKEN }}
218
- files : lcov.info
208
+ files : lcov-test-cairo-1.info lcov-test-cairo-2.info lcov-test-cairo-native .info
0 commit comments