mirror of
https://github.com/alexgo-io/stacks-puppet-node.git
synced 2026-05-28 06:25:23 +08:00
23 lines
550 B
Docker
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 /
|