Skip to content

Commit

Permalink
try to fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
deepu105 committed Dec 6, 2024
1 parent 30ab13b commit 3329f3e
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,24 +47,28 @@ jobs:
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('Cargo.lock') }}
- uses: dtolnay/rust-toolchain@nightly
name: Set Rust toolchain

with:
components: rustc, rust-std, cargo, llvm-tools, llvm-tools-preview
- run: cargo clean
- run: cargo install grcov
- run: cargo test
- run: mkdir -p ./target/debug/coverage
- run: cargo test --all-features
env:
CARGO_INCREMENTAL: '0'
RUSTFLAGS: '-Ccodegen-units=1 -Copt-level=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests'
RUSTDOCFLAGS: '-Ccodegen-units=1 -Copt-level=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests'
LLVM_PROFILE_FILE: 'target/debug/coverage/dcaf-%p-%m.profraw'
RUSTFLAGS: '-Cinstrument-coverage -Cpanic=abort -Zpanic_abort_tests'
RUSTDOCFLAGS: '-C instrument-coverage -Cpanic=abort -Zpanic_abort_tests -Z unstable-options --persist-doctests target/debug/'
- run: zip ./target/debug/coverage/files.zip ./target/debug/coverage/dcaf-*.profraw
- name: coverage
id: coverage
run: |
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
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
- name: Push grcov results to Coveralls
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
file: /tmp/lcov-${{ github.sha }}.info
format: lcov
file: ./target/debug/coverage/coveralls

fmt:
name: Rustfmt
Expand Down

0 comments on commit 3329f3e

Please sign in to comment.