@@ -23,14 +23,16 @@ jobs:
2323 strategy :
2424 matrix :
2525 os : [ubuntu-latest, macos-latest, windows-latest]
26+ features : ["", "ring", "zero_hash_cache", "ring,zero_hash_cache"]
2627 runs-on : ${{ matrix.os }}
27- name : test-${{ matrix.os }}
28+ name : test-${{ matrix.os }}-feat-${{ matrix.features }}
2829 steps :
2930 - uses : actions/checkout@v3
3031 - name : Get latest version of stable Rust
3132 run : rustup update stable
3233 - name : Run tests
33- run : cargo test --release
34+ run : cargo test --release --no-default-features --features ${{ matrix.features }}
35+ # We use `--skip-clean` to aggregate the coverage from runs with different features.
3436 coverage :
3537 runs-on : ubuntu-latest
3638 name : cargo-tarpaulin
4042 run : rustup update stable
4143 - name : Install cargo-tarpaulin
4244 uses : taiki-e/install-action@cargo-tarpaulin
43- - name : Check code coverage with cargo-tarpaulin
44- run : cargo-tarpaulin --workspace --all-features --out xml
45+ - name : Check code coverage with cargo-tarpaulin (no features)
46+ run : cargo-tarpaulin --workspace --out xml --no-default-features
47+ - name : Check code coverage with cargo-tarpaulin (just `ring` feature)
48+ run : cargo-tarpaulin --workspace --out xml --skip-clean --no-default-features --features "ring"
49+ - name : Check code coverage with cargo-tarpaulin (just `zero_hash_cache` feature)
50+ run : cargo-tarpaulin --workspace --out xml --skip-clean --no-default-features --features "zero_hash_cache"
51+ - name : Check code coverage with cargo-tarpaulin (all features)
52+ run : cargo-tarpaulin --workspace --out xml --skip-clean --all-features
4553 - name : Upload to codecov.io
4654 uses : codecov/codecov-action@v3
4755 with :
0 commit comments