Skip to content

Commit 3329f3e

Browse files
committed
try to fix tests
1 parent 30ab13b commit 3329f3e

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

.github/workflows/ci.yml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,24 +47,28 @@ jobs:
4747
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('Cargo.lock') }}
4848
- uses: dtolnay/rust-toolchain@nightly
4949
name: Set Rust toolchain
50-
50+
with:
51+
components: rustc, rust-std, cargo, llvm-tools, llvm-tools-preview
52+
- run: cargo clean
5153
- run: cargo install grcov
52-
- run: cargo test
54+
- run: mkdir -p ./target/debug/coverage
55+
- run: cargo test --all-features
5356
env:
5457
CARGO_INCREMENTAL: '0'
55-
RUSTFLAGS: '-Ccodegen-units=1 -Copt-level=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests'
56-
RUSTDOCFLAGS: '-Ccodegen-units=1 -Copt-level=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests'
58+
LLVM_PROFILE_FILE: 'target/debug/coverage/dcaf-%p-%m.profraw'
59+
RUSTFLAGS: '-Cinstrument-coverage -Cpanic=abort -Zpanic_abort_tests'
60+
RUSTDOCFLAGS: '-C instrument-coverage -Cpanic=abort -Zpanic_abort_tests -Z unstable-options --persist-doctests target/debug/'
61+
- run: zip ./target/debug/coverage/files.zip ./target/debug/coverage/dcaf-*.profraw
5762
- name: coverage
5863
id: coverage
5964
run: |
60-
grcov '/home/runner/work/jwt-ui/jwt-ui' --source-dir '/home/runner/work/jwt-ui/jwt-ui' --service-job-id ${{ github.job }} --service-name 'Continuous Integration' --commit-sha ${{ github.sha }} --output-file "/tmp/lcov-${{ github.sha }}.info" --branch --ignore-not-existing --llvm --filter covered --ignore '/*' --ignore 'C:/*' --ignore '../*' -t lcov
65+
grcov ./target/debug/coverage/files.zip -s . --binary-path ./target/debug/ --service-job-id ${{ github.job }} --service-name 'Continuous Integration' --commit-sha ${{ github.sha }} -o ./target/debug/coverage/ --branch --ignore-not-existing --llvm --filter covered --ignore '/*' --ignore 'C:/*' --ignore '../*' -t coveralls
6166
6267
- name: Push grcov results to Coveralls
6368
uses: coverallsapp/github-action@v2
6469
with:
6570
github-token: ${{ secrets.GITHUB_TOKEN }}
66-
file: /tmp/lcov-${{ github.sha }}.info
67-
format: lcov
71+
file: ./target/debug/coverage/coveralls
6872

6973
fmt:
7074
name: Rustfmt

0 commit comments

Comments
 (0)