diff --git a/.github/workflows/coverage.yaml b/.github/workflows/coverage.yaml new file mode 100644 index 0000000000..50b988f7df --- /dev/null +++ b/.github/workflows/coverage.yaml @@ -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 diff --git a/roles/v2/mining-proxy/src/lib/upstream_mining.rs b/roles/v2/mining-proxy/src/lib/upstream_mining.rs index a3aff0f5bd..9668afcd3d 100644 --- a/roles/v2/mining-proxy/src/lib/upstream_mining.rs +++ b/roles/v2/mining-proxy/src/lib/upstream_mining.rs @@ -318,3 +318,11 @@ impl UpstreamMiningNodes { Err(()) } } + +#[cfg(test)] +mod tests { + #[test] + fn test_one() { + assert_eq!(1, 1); + } +}