Skip to content

Commit

Permalink
Cargo tarpaulin GH Actions code coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
rrybarczyk committed Nov 29, 2021
1 parent 9201fd7 commit 5c1ebdc
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/coverage.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
on:
push:
branches:
- main
pull_request:
branches:
- main

name: Code Coverage

jobs:
test:
name: Coverage
runs-on: ubuntu-latest
container:
image: xd009642/tarpaulin:develop-nightly
options: --security-opt seccomp=unconfined
steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Generate code coverage
run: |
cargo +nightly tarpaulin --timeout 120
- name: Upload to codecov.io
uses: codecov/codecov-action@v2
with:
fail_ci_if_error: true
8 changes: 8 additions & 0 deletions roles/v2/mining-proxy/src/lib/upstream_mining.rs
Original file line number Diff line number Diff line change
Expand Up @@ -318,3 +318,11 @@ impl UpstreamMiningNodes {
Err(())
}
}

#[cfg(test)]
mod tests {
#[test]
fn test_one() {
assert_eq!(1, 1);
}
}

0 comments on commit 5c1ebdc

Please sign in to comment.