From 4604068f401704e9f56488bea1821dbdc685f09f Mon Sep 17 00:00:00 2001 From: SajjadPourali Date: Sun, 8 Nov 2026 11:56:46 -0700 Subject: [PATCH 1/3] Add test coverage to CI --- .github/workflows/rust.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index d0af1c0..659cdf4 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -47,3 +47,24 @@ jobs: - name: Abort on error if: ${{ failure() }} run: echo "Semver check failed" && false + + coverage: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v7 + - uses: dtolnay/rust-toolchain@stable + with: + components: llvm-tools-preview + - uses: taiki-e/install-action@nextest + - uses: taiki-e/install-action@cargo-llvm-cov + - name: Run tests with coverage + run: cargo llvm-cov nextest --all-features --all-targets --no-report + - name: Generate coverage reports + run: | + cargo llvm-cov report --summary-only + cargo llvm-cov report --lcov --output-path lcov.info + - uses: actions/upload-artifact@v7 + with: + name: coverage + path: lcov.info + if-no-files-found: error From 6d7740639eab823ef953d8b8a554fe0afa2b18ec Mon Sep 17 00:00:00 2001 From: SajjadPourali Date: Sun, 8 Nov 2026 12:05:08 -0700 Subject: [PATCH 2/3] Avoid duplicate CI runs on pull requests --- .github/workflows/rust.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 659cdf4..81053e4 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -1,7 +1,10 @@ name: Push or PR on: - [push, pull_request, workflow_dispatch] + push: + branches: [main] + pull_request: + workflow_dispatch: env: CARGO_TERM_COLOR: always From 325426b5453e2e133063d135c50d3ee7a417534f Mon Sep 17 00:00:00 2001 From: SajjadPourali Date: Sun, 8 Nov 2026 12:08:37 -0700 Subject: [PATCH 3/3] Align CI jobs with udp-stream --- .github/workflows/rust.yml | 32 +++++++++++++++++++------------- deny.toml | 7 +++++++ 2 files changed, 26 insertions(+), 13 deletions(-) create mode 100644 deny.toml diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 81053e4..698f145 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -10,30 +10,36 @@ env: CARGO_TERM_COLOR: always jobs: - build_n_test: - strategy: - matrix: - os: [ubuntu-latest] # macos-latest, windows-latest - - runs-on: ${{ matrix.os }} - + check: + runs-on: ubuntu-latest steps: - uses: actions/checkout@v7 - uses: dtolnay/rust-toolchain@stable - with: - components: rustfmt, clippy - uses: taiki-e/install-action@nextest - - name: rustfmt - run: cargo fmt --all -- --check - name: check run: cargo check --all-targets --all-features --verbose - - name: clippy - run: cargo clippy --all-targets --all-features -- -D warnings - name: Build run: cargo build --verbose --all-targets --all-features - name: Test run: cargo nextest run --all-features --all-targets + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v7 + - uses: dtolnay/rust-toolchain@stable + with: + components: rustfmt, clippy + - run: cargo fmt --all -- --check + - run: cargo clippy --workspace --all-targets --all-features -- -D warnings + if: always() + + audit: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v7 + - uses: EmbarkStudios/cargo-deny-action@v2 + semver: name: Check semver strategy: diff --git a/deny.toml b/deny.toml new file mode 100644 index 0000000..e2ae025 --- /dev/null +++ b/deny.toml @@ -0,0 +1,7 @@ +[sources] +unknown-registry = "deny" +unknown-git = "deny" + +[licenses] +allow = ["MIT", "Apache-2.0", "Unicode-3.0"] +confidence-threshold = 0.93