Skip to content

Commit 3836943

Browse files
committed
try improve coverage
1 parent d4cc0ac commit 3836943

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

.github/workflows/coverage.yml

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,25 +16,35 @@ env:
1616

1717
jobs:
1818
coverage:
19-
name: Run cargo coverage
20-
runs-on: ubuntu-latest
19+
name: Run cargo coverage on ${{ matrix.os }}
20+
runs-on: ${{ matrix.os }}
2121
steps:
2222
- name: Checkout sources
2323
uses: actions/checkout@v4
2424
- name: Install toolchain
2525
uses: actions-rs/toolchain@v1
2626
with:
27-
toolchain: 1.81.0
27+
toolchain: ${{ matrix.channel }}
2828
profile: minimal
2929
override: true
3030
components: llvm-tools-preview
3131
- name: Install cargo-llvm-cov
3232
uses: taiki-e/install-action@cargo-llvm-cov
3333
- name: Generate code coverage
34-
run: sudo bash -c "ulimit -Sl 512 && ulimit -Hl 512 && sudo -u runner /home/runner/.cargo/bin/cargo llvm-cov --release --all --lcov --output-path lcov.info"
34+
run: bash -c "ulimit -Sl 512 && ulimit -Hl 512 && /home/runner/.cargo/bin/cargo llvm-cov --release --all --lcov --output-path lcov.info"
3535
- name: Generate code coverage with all features
36-
run: sudo bash -c "ulimit -Sl 512 && ulimit -Hl 512 && sudo -u runner /home/runner/.cargo/bin/cargo llvm-cov --all-features --release --all --lcov --output-path lcov-all-features.info"
36+
run: bash -c "ulimit -Sl 512 && ulimit -Hl 512 && /home/runner/.cargo/bin/cargo llvm-cov --all-features --release --all --lcov --output-path lcov-all-features.info"
3737
- name: Upload coverage to Codecov
3838
run: |
3939
bash <(curl -s https://codecov.io/bash) -f lcov.info -t ${{ env.CODECOV_TOKEN }}
4040
bash <(curl -s https://codecov.io/bash) -f lcov-all-features.info -t ${{ env.CODECOV_TOKEN }}
41+
42+
strategy:
43+
fail-fast: false
44+
matrix:
45+
channel: [ 1.81.0 ]
46+
include:
47+
- os: ubuntu-latest
48+
cargo: /home/runner/.cargo/bin/cargo
49+
- os: macos-latest
50+
cargo: /Users/runner/.cargo/bin/cargo

0 commit comments

Comments
 (0)