Skip to content

Commit

Permalink
ci: reinstate coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
robjtede committed Aug 3, 2023
1 parent 12dbda9 commit eaabe7e
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 13 deletions.
26 changes: 14 additions & 12 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# disabled because `cargo tarpaulin` currently segfaults

name: Coverage

on:
Expand All @@ -14,21 +12,25 @@ concurrency:
cancel-in-progress: true

jobs:
# job currently (1st Feb 2022) segfaults
coverage:
name: coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Rust
uses: actions-rust-lang/setup-rust-toolchain@v1.5.0
with:
components: llvm-tools-preview

- name: Install cargo-llvm-cov
uses: taiki-e/install-action@v2.13.4
with:
tool: cargo-llvm-cov

- uses: actions-rust-lang/setup-rust-toolchain@v1
with: { toolchain: nightly }
- name: Generate code coverage
run: cargo llvm-cov --workspace --all-features --codecov --output-path codecov.json

- name: Generate coverage file
run: |
cargo install cargo-tarpaulin --vers "^0.13"
cargo tarpaulin --workspace --features=rustls,openssl --out Xml --verbose
- name: Upload to Codecov
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3.1.4
with:
file: cobertura.xml
files: codecov.json
fail_ci_if_error: true
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,6 @@ guide/build/

# Configuration directory generated by VSCode
.vscode

# code coverage
/codecov.json
2 changes: 1 addition & 1 deletion awc/src/client/connection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ mod test {
}
}
}
Err(err) => Poll::Ready(()),
Err(_) => Poll::Ready(()),
}
}
}
Expand Down

0 comments on commit eaabe7e

Please sign in to comment.