Skip to content

Commit 240ddae

Browse files
committed
Add codecov orb for coverage results
1 parent 764faa5 commit 240ddae

File tree

1 file changed

+15
-4
lines changed

1 file changed

+15
-4
lines changed

.circleci/config.yml

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
version: 2
1+
version: 2.1
2+
3+
orbs:
4+
codecov: codecov/codecov@3.2.2
5+
26
workflows:
37
version: 2
48
test:
@@ -34,6 +38,7 @@ workflows:
3438
# Long living branches
3539
- main
3640
# 👇Add your branch here if benchmarking matters to your work
41+
3742
coverage:
3843
jobs:
3944
- coverage:
@@ -705,15 +710,21 @@ jobs:
705710
- target
706711
key: cargocache-v2-benchmarking-rust:1.58.1-{{ checksum "~/project/Cargo.lock" }}
707712

708-
# This job follows the instructions from https://github.com/xd009642/tarpaulin#circleci
709713
coverage:
714+
# https://circleci.com/developer/images?imageType=machine
710715
machine:
711716
image: ubuntu-2004:202201-02
712717
steps:
713718
- checkout
714719
- run:
715-
name: Coverage with tarpaulin docker image
716-
command: docker run --security-opt seccomp=unconfined -v "${PWD}:/volume" xd009642/tarpaulin
720+
name: Run tests with coverage
721+
command: |
722+
mkdir -p cov
723+
docker run --security-opt seccomp=unconfined -v "${PWD}:/volume" xd009642/tarpaulin \
724+
sh -c "cargo tarpaulin --skip-clean --frozen --out Xml --output-dir cov"
725+
- codecov/upload:
726+
file: cov/cobertura.html
727+
flags: cw-plus
717728

718729
# This job roughly follows the instructions from https://circleci.com/blog/publishing-to-github-releases-via-circleci/
719730
build_and_upload_contracts:

0 commit comments

Comments
 (0)