mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-15 09:22:43 +03:00
Remove code coverage CI job (#874)
<!-- The PR description should answer 2 (maybe 3) important questions: --> ### What Our CI times are slow, thus merging is slow, and I do not feel this job pulls it weight. <!-- What is this PR trying to accomplish (and why, if it's not obvious)? --> <!-- Consider: do we need to add a changelog entry? --> ### How Remove the code coverage job from Buildkite, delete all associated files. <!-- How is it trying to accomplish it (what are the implementation steps)? --> V3_GIT_ORIGIN_REV_ID: 7bbde842f9f405920d1e559b8fef88078cc8d564
This commit is contained in:
parent
dacb229d10
commit
35a1fcad15
@ -1,25 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
export TEST_FAILURE=0
|
||||
# NOTE: We only run unit tests via --lib and --bins flags
|
||||
RUSTFLAGS="-Cinstrument-coverage" LLVM_PROFILE_FILE="cargo-test-%p-%m.profraw" cargo test --lib --bins || TEST_FAILURE=1
|
||||
if [ "$TEST_FAILURE" -eq 1 ]; then
|
||||
echo "WARNING: test failures found..."
|
||||
fi
|
||||
echo -e "\ngenerating coverage report...\n"
|
||||
mkdir -p coverage
|
||||
grcov . --binary-path ./target/debug/deps/ -s . -t markdown -p "${CARGO_HOME:=.cargo}" --branch --ignore-not-existing --ignore "../*" --ignore "/*" -o coverage
|
||||
# Strip header and footer and then sort
|
||||
(tail -n +3 coverage/markdown.md | head -n -2 | sort) > /tmp/sorted.md
|
||||
# Filter filepaths based on input argument
|
||||
if [ -n "$1" ]; then
|
||||
(grep -E "$1" /tmp/sorted.md > /tmp/sorted_filtered.md) || (echo "No relevant files found for coverage in current changelist" > /tmp/sorted_filtered.md)
|
||||
else
|
||||
cat /tmp/sorted.md > /tmp/sorted_filtered.md
|
||||
fi
|
||||
# Add header and footer back
|
||||
(head -n 2 coverage/markdown.md && cat /tmp/sorted_filtered.md && tail -n 2 coverage/markdown.md ) > coverage/markdown_sorted.md
|
||||
cat coverage/markdown_sorted.md
|
||||
rm -rf **/*.profraw
|
@ -22,7 +22,7 @@ ENV GIT_DISCOVERY_ACROSS_FILESYSTEM=1
|
||||
# Install Rust tools.
|
||||
COPY rust-toolchain.toml .
|
||||
RUN rustup show
|
||||
RUN cargo install cargo-chef cargo-nextest critcmp grcov just
|
||||
RUN cargo install cargo-chef cargo-nextest critcmp just
|
||||
|
||||
COPY Cargo.toml Cargo.lock .
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user