@@ -385,6 +385,46 @@ jobs:
385
385
components : rust-src
386
386
- run : cargo rustdoc --lib --no-default-features --features full -Zunstable-options --config "build.rustdocflags=[\"--cfg\", \"docsrs\"]"
387
387
388
+ coverage :
389
+ needs : [fmt]
390
+ name : coverage ${{ matrix.os }}
391
+ strategy :
392
+ matrix :
393
+ os : ["windows-latest", "macos-14", "ubuntu-latest"] # first available arm macos runner
394
+ runs-on : ${{ matrix.os }}
395
+ steps :
396
+ - if : ${{ github.event_name == 'pull_request' && matrix.os != 'ubuntu-latest' }}
397
+ id : should-skip
398
+ shell : bash
399
+ run : echo 'skip=true' >> $GITHUB_OUTPUT
400
+ - uses : actions/checkout@v4
401
+ if : steps.should-skip.outputs.skip != 'true'
402
+ - uses : actions/setup-python@v5
403
+ if : steps.should-skip.outputs.skip != 'true'
404
+ with :
405
+ python-version : ' 3.12'
406
+ - uses : Swatinem/rust-cache@v2
407
+ if : steps.should-skip.outputs.skip != 'true'
408
+ with :
409
+ save-if : ${{ github.event_name != 'merge_group' }}
410
+ - uses : dtolnay/rust-toolchain@stable
411
+ if : steps.should-skip.outputs.skip != 'true'
412
+ with :
413
+ components : llvm-tools-preview,rust-src
414
+ - name : Install cargo-llvm-cov
415
+ if : steps.should-skip.outputs.skip != 'true'
416
+ uses : taiki-e/install-action@cargo-llvm-cov
417
+ - run : python -m pip install --upgrade pip && pip install nox
418
+ if : steps.should-skip.outputs.skip != 'true'
419
+ - run : nox -s coverage
420
+ if : steps.should-skip.outputs.skip != 'true'
421
+ - uses : codecov/codecov-action@v4
422
+ if : steps.should-skip.outputs.skip != 'true'
423
+ with :
424
+ file : coverage.json
425
+ name : ${{ matrix.os }}
426
+ token : ${{ secrets.CODECOV_TOKEN }}
427
+
388
428
emscripten :
389
429
name : emscripten
390
430
if : ${{ contains(github.event.pull_request.labels.*.name, 'CI-build-full') || github.event_name != 'pull_request' }}
@@ -633,6 +673,7 @@ jobs:
633
673
- valgrind
634
674
- careful
635
675
- docsrs
676
+ - coverage
636
677
- emscripten
637
678
- test-debug
638
679
- test-free-threaded
0 commit comments