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

Calculate coverage #18

Merged
merged 2 commits into from
May 15, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 52 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,24 @@
name: CI

on:
pull_request:
push:
branches:
- master

pull_request:
branches:
- master
schedule:
- cron: '00 01 * * *'
env:
RUST_BACKTRACE: 1
jobs:
rust:
name: Rust
test:
name: Test

runs-on: ${{ matrix.os }}
strategy:
fail-fast: false

matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
rust: [stable, beta]
Expand All @@ -19,8 +27,7 @@ jobs:
CARGO_NET_RETRY: 10
steps:

- name: Checkout repository
uses: actions/checkout@v1
- uses: actions/checkout@v1

# We need to disable the existing toolchain to avoid updating rust-docs
# which takes a long time. The fastest way to do this is to rename the
Expand All @@ -44,13 +51,47 @@ jobs:
command: test
args: --no-run

- name: Test
- name: Test (Debug)
uses: actions-rs/cargo@v1
with:
command: test

- name: Build Documentation
- name: Test (Release)
uses: actions-rs/cargo@v1
with:
command: doc
args: --all --no-deps
command: test
args: --release

# Detect cases where documentation links don't resolve and such.
doc:
name: Docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
# Docs.rs uses nightly, which allows for easier syntax for linking to functions.
toolchain: nightly
override: true
- uses: actions-rs/cargo@v1
with:
# Need to use `cargo rustdoc` to actually get it to respect -D
# warnings... Note: this also requires nightly.
command: rustdoc
args: -- -D warnings

codecov:
name: Generate code coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true

- name: Run cargo-tarpaulin
uses: actions-rs/[email protected]

- name: Upload to codecov.io
uses: codecov/codecov-action@v1
2 changes: 2 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ignore:
- "tests/file_log_parser.rs"