Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: Add automated test coverage reports. #276

Merged
merged 33 commits into from
Apr 29, 2020
Merged

CI: Add automated test coverage reports. #276

merged 33 commits into from
Apr 29, 2020

Conversation

TriplEight
Copy link
Contributor

@TriplEight TriplEight commented Nov 25, 2019

Code coverage with grcov -> codecov.io

@TriplEight TriplEight added the A-CI Continuous integration work item label Nov 25, 2019
@codecov-io
Copy link

codecov-io commented Feb 7, 2020

Codecov Report

Merging #276 into master will increase coverage by 54.43%.
The diff coverage is 25.58%.

Impacted file tree graph

@@             Coverage Diff             @@
##           master     #276       +/-   ##
===========================================
+ Coverage   18.74%   73.18%   +54.43%     
===========================================
  Files          28       99       +71     
  Lines        1814     7405     +5591     
===========================================
+ Hits          340     5419     +5079     
- Misses       1474     1986      +512     
Impacted Files Coverage Δ
core/src/env/engine/off_chain/db/accounts.rs 80.39% <0.00%> (ø)
core/src/env/engine/off_chain/db/chain_spec.rs 72.00% <0.00%> (ø)
core/src/env/engine/off_chain/db/console.rs 0.00% <0.00%> (ø)
core/src/env/engine/off_chain/db/events.rs 0.00% <0.00%> (ø)
core/src/env/engine/off_chain/runtime_calls.rs 50.00% <0.00%> (ø)
core/src/env/engine/off_chain/runtime_storage.rs 57.14% <0.00%> (ø)
lang/macro/src/codegen/testable.rs 84.00% <ø> (+84.00%) ⬆️
core/src/env/engine/off_chain/mod.rs 67.08% <42.10%> (ø)
core/src/env/engine/off_chain/test_api.rs 62.79% <100.00%> (ø)
primitives/src/key.rs 59.67% <0.00%> (-10.96%) ⬇️
... and 94 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a8b791a...8063643. Read the comment docs.

.gitlab-ci.yml Outdated Show resolved Hide resolved
.gitlab-ci.yml Outdated Show resolved Hide resolved
.gitlab-ci.yml Outdated Show resolved Hide resolved
@TriplEight
Copy link
Contributor Author

Apparently, -Zno-landing-pads caused test failures, removed it.
This is how codecov is working now.
https://gitlab.parity.io/parity/ink/-/jobs/483361
https://codecov.io/gh/paritytech/ink/tree/dccf7f18e53ad7f0e517b42227173adde723ba04
@Robbepop I need to know if it counts an adequate amount of lines and approximate coverage.

@TriplEight
Copy link
Contributor Author

This is what I've managed to reach with grcov https://codecov.io/gh/paritytech/ink/tree/84e452a2b08d8ca6a7ed5c26a17d61ed7e183615

This is how to run tarpaulin, which is better, but there's no way to run it within docker not dropping it's security via
docker run -it --security-opt seccomp=unconfined ...

cargo install cargo-tarpaulin
CODECOV_TOKEN=xxxxxxxxxxxxxxxxxx cargo +nightly tarpaulin --verbose --all-features --workspace -t 120 --out Xml
CODECOV_TOKEN=xxxxxxxxxxxxxxxxxx bash <(curl -s https://codecov.io/bash)

@TriplEight TriplEight changed the title WIP code coverage code coverage Apr 28, 2020
.gitlab-ci.yml Outdated Show resolved Hide resolved
.gitlab-ci.yml Outdated Show resolved Hide resolved
.gitlab-ci.yml Outdated Show resolved Hide resolved
.gitlab-ci.yml Show resolved Hide resolved
.gitlab-ci.yml Outdated Show resolved Hide resolved
.gitlab-ci.yml Outdated Show resolved Hide resolved
.gitlab-ci.yml Outdated Show resolved Hide resolved
.gitlab-ci.yml Outdated Show resolved Hide resolved
TriplEight and others added 2 commits April 29, 2020 13:00
Co-Authored-By: Hero Bird <[email protected]>
Co-Authored-By: Hero Bird <[email protected]>
@Robbepop Robbepop changed the title code coverage CI: Add automated code coverage reports. Apr 29, 2020
@Robbepop Robbepop changed the title CI: Add automated code coverage reports. CI: Add automated test coverage reports. Apr 29, 2020
TriplEight and others added 2 commits April 29, 2020 13:01
Co-Authored-By: Hero Bird <[email protected]>
Co-Authored-By: Hero Bird <[email protected]>
@Robbepop Robbepop merged commit ce29733 into master Apr 29, 2020
@Robbepop Robbepop deleted the grcov_for_ink branch April 29, 2020 11:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-CI Continuous integration work item
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants