From b131b5207ca33d35a8a4b4a121eee311e91dba2a Mon Sep 17 00:00:00 2001 From: Martin Geisler Date: Thu, 9 May 2019 21:47:16 +0200 Subject: [PATCH] Run cargo tarpaulin in a machine image This way we can specify the necessary Docker security options to let Tarpaulin run while still getting the benefits of using a prebuilt Docker image. --- .circleci/config.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 4f928a6c..b3d23b12 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,13 +1,18 @@ version: 2 jobs: build: - docker: - - image: xd009642/tarpaulin + machine: true steps: - checkout + - run: + name: Pull xd009642/tarpaulin + command: docker pull xd009642/tarpaulin - run: name: Generate coverage report - command: cargo tarpaulin --out Xml --all-features + command: >- + docker run --security-opt seccomp=unconfined + -v $PWD:/volume xd009642/tarpaulin + cargo tarpaulin --out Xml --all-features - run: name: Upload to codecov.io command: bash <(curl -s https://codecov.io/bash) -Z -f cobertura.xml