Skip to content

Commit

Permalink
chore: remove duplicated code
Browse files Browse the repository at this point in the history
  • Loading branch information
ngutech21 committed Mar 22, 2024
1 parent 02603f9 commit e3494da
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,24 +41,16 @@ final-check:

# run coverage and create a report in html and lcov format
run-coverage:
#!/usr/bin/env bash
docker compose --profile itest up -d
mkdir -p target/coverage
RUST_BACKTRACE=1 CARGO_INCREMENTAL=0 RUSTFLAGS='-Cinstrument-coverage' LLVM_PROFILE_FILE='cargo-test-%p-%m.profraw' cargo test -- --test-threads=1
docker compose --profile itest down
grcov . --binary-path ./target/debug/ -s . -t lcov,html --branch --ignore-not-existing --ignore "*cargo*" --ignore "./data/*" -o target/coverage/
find . -name '*.profraw' -exec rm -r {} \;
>&2 echo '💡 Created the report in html-format target/coverage/html/index.html'
just run-coverage-tests
just run-coverage-report

# run coverage and create a report in html and lcov format
# runs all tests with coverage instrumentation
run-coverage-tests:
docker compose --profile itest up -d
RUST_BACKTRACE=1 CARGO_INCREMENTAL=0 RUSTFLAGS='-Cinstrument-coverage' LLVM_PROFILE_FILE='cargo-test-%p-%m.profraw' cargo test -- --test-threads=1
docker compose --profile itest down


# run coverage and create a report in html and lcov format
# creates a coverage report in html and lcov format
run-coverage-report:
#!/usr/bin/env bash
mkdir -p target/coverage
Expand Down

0 comments on commit e3494da

Please sign in to comment.