mirror of
https://github.com/GyulyVGC/sniffnet.git
synced 2026-08-28 04:26:35 +00:00
added code coverage in CI
This commit is contained in:
parent
c8071cbe1a
commit
bcdad1141e
1 changed files with 21 additions and 0 deletions
21
.github/workflows/rust.yml
vendored
21
.github/workflows/rust.yml
vendored
|
|
@ -11,6 +11,8 @@ on:
|
|||
secrets:
|
||||
NPCAP_OEM_URL:
|
||||
required: true
|
||||
CODECOV_TOKEN:
|
||||
required: true
|
||||
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
|
|
@ -50,12 +52,31 @@ jobs:
|
|||
|
||||
- name: fmt
|
||||
run: cargo fmt --all -- --check
|
||||
|
||||
- name: build
|
||||
if: matrix.os != 'windows' || github.event_name != 'pull_request'
|
||||
run: cargo build --verbose
|
||||
|
||||
- name: clippy
|
||||
if: matrix.os != 'windows' || github.event_name != 'pull_request'
|
||||
run: cargo clippy -- -D warnings
|
||||
|
||||
- name: test
|
||||
if: matrix.os != 'windows' || github.event_name != 'pull_request'
|
||||
run: cargo test --verbose -- --nocapture
|
||||
|
||||
- name: Install cargo-llvm-cov
|
||||
if: matrix.os == 'ubuntu'
|
||||
uses: taiki-e/install-action@cargo-llvm-cov
|
||||
|
||||
- name: Generate code coverage
|
||||
if: matrix.os == 'ubuntu'
|
||||
run: cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info
|
||||
|
||||
- name: Upload coverage to Codecov
|
||||
if: matrix.os == 'ubuntu'
|
||||
uses: codecov/codecov-action@v4
|
||||
with:
|
||||
files: lcov.info
|
||||
fail_ci_if_error: false
|
||||
token: ${{ secrets.CODECOV_TOKEN }}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue