Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tarpaulin based code coverage job #146

Merged
merged 1 commit into from
Oct 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ jobs:
benchmarks:
needs: trigger
uses: ./.github/workflows/benchmarks.yml
coverage:
needs: trigger
uses: ./.github/workflows/coverage.yml

check-all-green:
needs:
Expand Down
17 changes: 17 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Tests
on: [workflow_call]
permissions: {}

jobs:
coverage-linux:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
- name: Install stable toolchain
uses: actions-rs/toolchain@b2417cde72dcf67f306c0ae8e0828a81bf0b189f # v1.0.6
- name: Download tarpaulin
run: curl -L 'https://github.com/xd009642/tarpaulin/releases/download/0.27.1/cargo-tarpaulin-x86_64-unknown-linux-musl.tar.gz' | tar xvz
- name: Verify download
run: echo '564ea439a14eced45cdb3e50b55a463502d9fbfb7722535c5d0390b6577ce343 cargo-tarpaulin' | sha256sum --check --status
- name: Run cargo-tarpaulin
run: ./cargo-tarpaulin -v --all --out Xml --offline --exclude-files '../3rd-party/*,clis/*'
1 change: 1 addition & 0 deletions crates/telio-sockets/src/protector/linux.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ mod tests {

use super::*;

#[cfg(not(tarpaulin))]
#[rstest]
#[case(IpAddr::V4(Ipv4Addr::LOCALHOST))]
#[case(IpAddr::V4(Ipv4Addr::UNSPECIFIED))]
Expand Down
Loading