1
0
Fork 0
mirror of https://github.com/actix/actix-web.git synced 2024-11-25 19:11:10 +00:00

ci: reinstate coverage

This commit is contained in:
Rob Ede 2023-08-03 06:58:31 +01:00
parent 12dbda986e
commit eaabe7e686
No known key found for this signature in database
GPG key ID: 97C636207D3EF933
3 changed files with 18 additions and 13 deletions

View file

@ -1,5 +1,3 @@
# disabled because `cargo tarpaulin` currently segfaults
name: Coverage name: Coverage
on: on:
@ -14,21 +12,25 @@ concurrency:
cancel-in-progress: true cancel-in-progress: true
jobs: jobs:
# job currently (1st Feb 2022) segfaults
coverage: coverage:
name: coverage
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - 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 - name: Install cargo-llvm-cov
with: { toolchain: nightly } uses: taiki-e/install-action@v2.13.4
with:
tool: cargo-llvm-cov
- name: Generate coverage file - name: Generate code coverage
run: | run: cargo llvm-cov --workspace --all-features --codecov --output-path codecov.json
cargo install cargo-tarpaulin --vers "^0.13"
cargo tarpaulin --workspace --features=rustls,openssl --out Xml --verbose - name: Upload coverage to Codecov
- name: Upload to Codecov
uses: codecov/codecov-action@v3.1.4 uses: codecov/codecov-action@v3.1.4
with: with:
file: cobertura.xml files: codecov.json
fail_ci_if_error: true

3
.gitignore vendored
View file

@ -19,3 +19,6 @@ guide/build/
# Configuration directory generated by VSCode # Configuration directory generated by VSCode
.vscode .vscode
# code coverage
/codecov.json

View file

@ -441,7 +441,7 @@ mod test {
} }
} }
} }
Err(err) => Poll::Ready(()), Err(_) => Poll::Ready(()),
} }
} }
} }