Files
stacks-puppet-node/.github/actions/bitcoin-int-tests/Dockerfile.code-cov
2022-09-30 14:39:54 -05:00

23 lines
550 B
Docker

FROM rust:bullseye AS test
WORKDIR /build
ENV CARGO_MANIFEST_DIR="$(pwd)"
RUN rustup component add llvm-tools-preview && \
cargo install grcov
ENV RUSTFLAGS="-Cinstrument-coverage" \
LLVM_PROFILE_FILE="stacks-blockchain-%p-%m.profraw"
COPY . .
RUN cargo build --workspace && \
cargo test --workspace
# Generate coverage report and upload it to codecov
RUN grcov . --binary-path ./target/debug/ -s . -t lcov --branch --ignore-not-existing --ignore "/*" -o lcov.info
FROM scratch AS export-stage
COPY --from=test /build/lcov.info /