diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 42f16450d..1e450d491 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -1,5 +1,3 @@ -# disabled because `cargo tarpaulin` currently segfaults - name: Coverage on: @@ -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 - - uses: actions-rust-lang/setup-rust-toolchain@v1 - with: { toolchain: nightly } + - name: Install cargo-llvm-cov + uses: taiki-e/install-action@v2.13.4 + with: + tool: cargo-llvm-cov - - 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: Generate code coverage + run: cargo llvm-cov --workspace --all-features --codecov --output-path codecov.json + + - name: Upload coverage to Codecov uses: codecov/codecov-action@v3.1.4 with: - file: cobertura.xml + files: codecov.json + fail_ci_if_error: true diff --git a/.gitignore b/.gitignore index 543403267..91930acf8 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,6 @@ guide/build/ # Configuration directory generated by VSCode .vscode + +# code coverage +/codecov.json diff --git a/awc/src/client/connection.rs b/awc/src/client/connection.rs index 12d00914a..5ed965bed 100644 --- a/awc/src/client/connection.rs +++ b/awc/src/client/connection.rs @@ -441,7 +441,7 @@ mod test { } } } - Err(err) => Poll::Ready(()), + Err(_) => Poll::Ready(()), } } }