-
Notifications
You must be signed in to change notification settings - Fork 355
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #715 from CosmWasm/172-code-coverage
Add code coverage to CI
- Loading branch information
Showing
3 changed files
with
62 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,8 @@ | ||
version: 2 | ||
version: 2.1 | ||
|
||
orbs: | ||
codecov: codecov/[email protected] | ||
|
||
workflows: | ||
version: 2 | ||
test: | ||
|
@@ -34,6 +38,7 @@ workflows: | |
# Long living branches | ||
- main | ||
# 👇Add your branch here if benchmarking matters to your work | ||
- coverage | ||
deploy: | ||
jobs: | ||
- build_and_upload_contracts: | ||
|
@@ -695,6 +700,21 @@ jobs: | |
- target | ||
key: cargocache-v2-benchmarking-rust:1.58.1-{{ checksum "~/project/Cargo.lock" }} | ||
|
||
coverage: | ||
# https://circleci.com/developer/images?imageType=machine | ||
machine: | ||
image: ubuntu-2004:202201-02 | ||
steps: | ||
- checkout | ||
- run: | ||
name: Run tests with coverage | ||
command: | | ||
mkdir -p cov | ||
docker run --security-opt seccomp=unconfined -v "${PWD}:/volume" xd009642/tarpaulin \ | ||
sh -c "cargo tarpaulin --skip-clean --frozen --out Xml --output-dir cov" | ||
- codecov/upload: | ||
file: cov/cobertura.xml | ||
|
||
# This job roughly follows the instructions from https://circleci.com/blog/publishing-to-github-releases-via-circleci/ | ||
build_and_upload_contracts: | ||
docker: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
comment: false | ||
|
||
coverage: | ||
status: | ||
project: | ||
default: | ||
threshold: 0.05% | ||
patch: | ||
default: | ||
threshold: 0.05% | ||
|
||
ignore: |