Skip to content

Commit

Permalink
CI: test run formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
jdx committed Dec 14, 2023
1 parent 04ea51b commit f6cd959
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -47,27 +47,38 @@ test-e2e TEST=("all"): build
# run unit tests w/ coverage
test-coverage:
#!/usr/bin/env bash
echo "::group::Setup"
set -euxo pipefail
source <(cargo llvm-cov show-env --export-prefix)
cargo llvm-cov clean --workspace
if [[ -n "${RTX_GITHUB_BOT_TOKEN:-}" ]]; then
export GITHUB_API_TOKEN="$RTX_GITHUB_BOT_TOKEN"
fi

export CARGO_TARGET_DIR="${CARGO_TARGET_DIR:-$PWD/target}"
export PATH="${CARGO_TARGET_DIR}/debug:$PATH"
echo "::endgroup::"
echo "::group::Unit tests"
cargo test --all-features
echo "::endgroup::"
echo "::group::Build w/ coverage"
cargo build --all-features
echo "::endgroup::"
./e2e/run_all_tests
if [[ "${TEST_TRANCHE:-}" == 0 ]]; then
echo "::group::Trust"
rtx trust
echo "::group::render-help render-completions render-mangen"
just render-help render-completions render-mangen
echo "::group::Implode"
rtx implode
elif [[ "${TEST_TRANCHE:-}" == 1 ]]; then
echo "::group::Trust"
rtx trust
echo "::group::Self update"
rtx self-update -fy
fi
echo "::group::Render lcov report"
cargo llvm-cov report --lcov --output-path lcov.info

# delete built files
Expand Down

0 comments on commit f6cd959

Please sign in to comment.