Skip to content

Instantly share code, notes, and snippets.

@hn3000
Created April 17, 2021 00:20
Show Gist options
  • Save hn3000/df8450134f8a1d0ff05a647d2aba5474 to your computer and use it in GitHub Desktop.
Save hn3000/df8450134f8a1d0ff05a647d2aba5474 to your computer and use it in GitHub Desktop.
cargo tarpaulin in docker
## run with `docker run --security-opt seccomp=unconfined -it <image-name>`
## (-it in case your unit tests rely on the ability to read stdin)
FROM rust:1-slim-buster as builder
RUN apt update && apt install -y pkg-config libssl-dev && cargo install cargo-tarpaulin
WORKDIR /build
COPY . .
CMD [ "cargo", "tarpaulin", "--tests", "--out html", "--outdir", "coverage" ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment