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: switched to source-based coverage #192

Merged
merged 2 commits into from
Nov 26, 2020
Merged

Conversation

ErikBjare
Copy link
Member

@ErikBjare ErikBjare commented Nov 26, 2020

Largely based on how grcov themselves do it: https://github.com/mozilla/grcov/blob/master/.travis.yml

From mozilla/grcov@e98d5dd, it seems we can go even further and remove CARGO_INCREMENTAL and RUSTDOCFLAGS.

Hopefully helps with #189

Screenshot of HTML report when I run locally. Note that source-based coverage grcov doesn't support branch coverage (I asked them about it in mozilla/grcov#520):

image

@ErikBjare
Copy link
Member Author

ErikBjare commented Nov 26, 2020

Getting a better error message for the blinking macOS builds (#180):

 error[E0514]: found crate `serde_derive` compiled by an incompatible version of rustc which `serde` depends on
 --> aw-models/src/timeinterval.rs:3:5
  |
3 | use serde::de::{self, Deserialize, Deserializer, Visitor};
  |     ^^^^^
  |
  = help: please recompile that crate using this compiler (rustc 1.50.0-nightly (b48cafd9e 2020-11-25))
  = note: the following crate versions were found:
          crate `serde_derive` compiled by rustc 1.50.0-nightly (a0d664bae 2020-11-22): /Users/runner/work/aw-server-rust/aw-server-rust/target/debug/deps/libserde_derive_internals-67951bb09d951f1c.rmeta
          crate `serde_derive` compiled by rustc 1.50.0-nightly (a0d664bae 2020-11-22): /Users/runner/work/aw-server-rust/aw-server-rust/target/debug/deps/libserde_derive_internals-67951bb09d951f1c.rlib

I assume we'll have to somehow discard the cache if we're using a new compiler. Weird that cargo/rustc doesn't do this itself.

@codecov
Copy link

codecov bot commented Nov 26, 2020

Codecov Report

Merging #192 (5a2690b) into master (d44b082) will increase coverage by 6.13%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #192      +/-   ##
==========================================
+ Coverage   53.60%   59.74%   +6.13%     
==========================================
  Files          58       42      -16     
  Lines        7687     4308    -3379     
  Branches     1821        0    -1821     
==========================================
- Hits         4121     2574    -1547     
+ Misses       3559     1734    -1825     
+ Partials        7        0       -7     
Impacted Files Coverage Δ
aw-server/src/dirs.rs 0.00% <0.00%> (-86.05%) ⬇️
aw-transform/src/split_url.rs 10.34% <0.00%> (-80.57%) ⬇️
aw-server/src/logging.rs 0.00% <0.00%> (-71.80%) ⬇️
aw-transform/src/flood.rs 62.96% <0.00%> (-35.03%) ⬇️
aw-transform/src/heartbeat.rs 73.91% <0.00%> (-21.44%) ⬇️
aw-transform/src/find_bucket.rs 83.33% <0.00%> (-16.67%) ⬇️
aw-transform/src/filter_keyvals.rs 86.36% <0.00%> (-13.64%) ⬇️
aw-query/src/datatype.rs 72.50% <0.00%> (-9.17%) ⬇️
aw-transform/src/chunk.rs 92.00% <0.00%> (-8.00%) ⬇️
aw-query/src/functions.rs 84.39% <0.00%> (-7.59%) ⬇️
... and 48 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 d44b082...5a2690b. Read the comment docs.

@@ -67,7 +70,7 @@ jobs:
export PATH=$PATH:.
make coverage-lcov COVERAGE_CACHE=1
Copy link
Member Author

@ErikBjare ErikBjare Nov 26, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@johan-bjareholt Why is COVERAGE_CACHE set?

Edit: Nvm, I think I get it.

@ErikBjare
Copy link
Member Author

@johan-bjareholt It seems like coverage reporting is consistent now (at least from the two commits in this PR 🤞)... I will go ahead and merge this so I rebase another PR and hopefully get reasonable results.

@ErikBjare ErikBjare merged commit 65e28bf into master Nov 26, 2020
@ErikBjare ErikBjare deleted the dev/source-based-coverage branch November 26, 2020 12:04
@ErikBjare
Copy link
Member Author

From looking at the rebased #185 it looks like coverage works properly now 🎉

Hoping it stays that way 🤞

This was referenced Dec 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant