mirror of
https://github.com/alexgo-io/stacks-subnets.git
synced 2026-01-12 16:53:24 +08:00
20 lines
528 B
Docker
20 lines
528 B
Docker
FROM rust:bullseye AS build
|
|
|
|
WORKDIR /build
|
|
|
|
RUN rustup override set nightly && \
|
|
rustup component add llvm-tools-preview && \
|
|
cargo install grcov
|
|
|
|
ENV RUSTFLAGS="-Zinstrument-coverage" \
|
|
LLVM_PROFILE_FILE="stacks-blockchain-%p-%m.profraw"
|
|
|
|
COPY . .
|
|
|
|
RUN cargo build && \
|
|
cargo test
|
|
|
|
# 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 && \
|
|
bash -c "bash <(curl -s https://codecov.io/bash)"
|