Skip to content

rework github actions for code coverage #186

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

Merged
merged 13 commits into from
Jun 7, 2020

Conversation

maxcountryman
Copy link
Contributor

This reworks our GitHub Actions workflow to include code coverage via
tarpaulin. Note that this is essentially directly lifted from the
again[1] crate's methodology.

Fixes #164.

[1]
https://github.com/softprops/again/blob/dd5f0013533e28f803b282ebc281e9525ca64d86/.github/workflows/main.yml

This reworks our GitHub Actions workflow to include code coverage via
tarpaulin. Note that this is essentially directly lifted from the
again[1] crate's methodology.

Fixes apache#164.

[1]
https://github.com/softprops/again/blob/dd5f0013533e28f803b282ebc281e9525ca64d86/.github/workflows/main.yml
@maxcountryman
Copy link
Contributor Author

Here's an example workflow run on my branch.

@Dandandan
Copy link
Contributor

Looking good!

Copy link
Contributor

@nickolay nickolay left a comment

Choose a reason for hiding this comment

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

Thanks for working on this!

As noted, I can't see the coverage information on coveralls.io -- so can't check how useful it is. Two other things that prevent me from merging this is the duration of the CI run and the question of CI's stability in face of Rust nightlies often lacking some components.

@nickolay nickolay merged commit af54eb0 into apache:master Jun 7, 2020
@nickolay
Copy link
Contributor

nickolay commented Jun 7, 2020

Thank you! I hope this lets us ditch travis soon.

@nickolay
Copy link
Contributor

nickolay commented Jun 7, 2020

Sadly tarpaulin seems to perform worse than our previous coverage solution, e.g. https://coveralls.io/builds/31294002/source?filename=src/parser.rs#L244 vs https://coveralls.io/builds/28060470/source?filename=src/parser.rs#L244

Comment on lines +14 to +18
# Note that `nightly` is required for `license_template_path`, as
# it's an unstable feature.
rust-version: nightly
- uses: actions/checkout@v2
- run: cargo fmt -- --check --config-path <(echo 'license_template_path = "HEADER"')
Copy link
Contributor

@nickolay nickolay Jul 31, 2020

Choose a reason for hiding this comment

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

I just noticed this does not use cargo +nightly fmt, making it print a Warning: can't set license_template_path = "HEADER", unstable features are only available in nightly channel. and presumably not run that check.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh no, definitely an oversight on my part. Should be a trivial fix.

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.

Fix broken code coverage
3 participants