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

Add code coverage: tarpaulin / codecov #411

Merged
merged 17 commits into from
Jun 1, 2020
28 changes: 28 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
on: [push]

name: build

jobs:
check:
name: Rust project
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true

- name: Run cargo-tarpaulin
uses: actions-rs/tarpaulin@v0.1
with:
version: '0.9.0'
args: '-- --test-threads 1'

- name: Upload to codecov.io
uses: codecov/codecov-action@v1.0.2
with:
token: 47ec4d53-b25e-4a34-a93e-5a951ea77412
11 changes: 10 additions & 1 deletion .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,16 @@ jobs:
- uses: actions-rs/cargo@v1
with:
command: test
args: -v
args: -v
Lan2u marked this conversation as resolved.
Show resolved Hide resolved
- name: Run cargo-tarpaulin
uses: actions-rs/tarpaulin@v0.1
with:
version: '0.12.4'
Lan2u marked this conversation as resolved.
Show resolved Hide resolved
args: '-- --test-threads 1'
Lan2u marked this conversation as resolved.
Show resolved Hide resolved
- name: Upload to codecov.io
uses: codecov/codecov-action@v1.0.2
with:
token:
Copy link
Member

Choose a reason for hiding this comment

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

We don't need to specify a token, since this is a public repository. This can be removed :)

Copy link
Author

Choose a reason for hiding this comment

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

I removed this but it seems to still fail? Perhaps it is because I'm trying from my fork of the repo.

Copy link
Member

Choose a reason for hiding this comment

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

I think this is because we still don't have the project in CodeCov. Public repos shouldn't need a token.


test_on_windows:
name: Test Suite on Windows
Expand Down
Loading