mirror of
https://github.com/ntex-rs/ntex.git
synced 2025-04-03 21:07:39 +03:00
46 lines
1.6 KiB
YAML
46 lines
1.6 KiB
YAML
name: Coverage
|
|
|
|
on: [pull_request, push]
|
|
|
|
jobs:
|
|
coverage:
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
steps:
|
|
- name: Free Disk Space
|
|
uses: jlumbroso/free-disk-space@main
|
|
with:
|
|
tool-cache: true
|
|
|
|
- uses: actions/checkout@v4
|
|
- name: Install Rust
|
|
run: rustup update nightly
|
|
- name: Install cargo-llvm-cov
|
|
uses: taiki-e/install-action@cargo-llvm-cov
|
|
|
|
- uses: actions-rust-lang/setup-rust-toolchain@v1
|
|
- name: Generate Cargo.lock
|
|
run: cargo generate-lockfile
|
|
|
|
- name: Clean coverage results
|
|
run: cargo llvm-cov clean --workspace
|
|
|
|
- name: Code coverage (glommio)
|
|
run: cargo +nightly llvm-cov --no-report --all --no-default-features --features="glommio,cookie,url,compress,openssl,rustls,ws,brotli"
|
|
|
|
- name: Code coverage (compio)
|
|
run: cargo +nightly llvm-cov --no-report --all --no-default-features --features="compio,cookie,url,compress,openssl,rustls,ws,brotli"
|
|
|
|
- name: Code coverage
|
|
run: RUST_LOG=trace cargo +nightly llvm-cov --no-report --all --doctests --no-default-features --features="tokio,cookie,url,compress,openssl,rustls,ws,brotli"
|
|
|
|
- name: Generate coverage report
|
|
run: cargo +nightly llvm-cov report --lcov --output-path lcov.info --ignore-filename-regex="ntex-tokio|ntex-glommio|ntex-async-std|ntex-compio"
|
|
|
|
- name: Upload coverage to Codecov
|
|
uses: codecov/codecov-action@v4
|
|
with:
|
|
token: ${{ secrets.CODECOV_TOKEN }}
|
|
files: lcov.info
|
|
fail_ci_if_error: true
|