Skip to content

rework github actions for code coverage - #186

Merged
nickolay merged 13 commits into
apache:masterfrom
maxcountryman:fixup/code-coverage
Jun 7, 2020
Merged

nickolay merged 13 commits into
apache:masterfrom
maxcountryman:fixup/code-coverage

Conversation

@maxcountryman

Copy link
Copy Markdown
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
Copy Markdown
Contributor Author

Here's an example workflow run on my branch.

@Dandandan

Copy link
Copy Markdown
Contributor

Looking good!

@nickolay nickolay left a comment

Copy link
Copy Markdown
Contributor

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.

Comment thread .github/workflows/rust.yml Outdated
Comment thread .github/workflows/rust.yml Outdated
Comment thread .github/workflows/rust.yml Outdated
Comment thread .github/workflows/rust.yml Outdated
Comment thread .github/workflows/rust.yml Outdated
Comment thread .github/workflows/rust.yml
Comment thread .github/workflows/rust.yml Outdated
Comment thread .github/workflows/rust.yml
Comment thread .github/workflows/rust.yml Outdated
Comment thread .github/workflows/rust.yml Outdated
@nickolay
nickolay merged commit af54eb0 into apache:master Jun 7, 2020
@nickolay

nickolay commented Jun 7, 2020

Copy link
Copy Markdown
Contributor

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

@nickolay

nickolay commented Jun 7, 2020

Copy link
Copy Markdown
Contributor

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"')

@nickolay nickolay Jul 31, 2020 •

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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