From f97f7b2860ba830216b713adfaa9024895af9a39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Ma=C4=87kowski?= Date: Sun, 1 Mar 2026 19:04:35 +0100 Subject: [PATCH] chore(ci): disable branch coverage for now We've pinned the Rust nightly to a specific version, because it caused some problems when generating the coverage. Seems like the issue hasn't been fixed yet, while a newer nightly version introduced some formatter changes, so it's difficult to stay on the pinned version any longer. This disables the nightly-only branch coverage calculation and upgrades the Rust nightly version in the CI. Relevant issues: * llvm/llvm-project#119558 * taiki-e/cargo-llvm-cov#8 --- .github/workflows/rust.yml | 9 +++++---- cot/src/lib.rs | 3 ++- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 6bd46139..5183053a 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -17,7 +17,7 @@ env: _RUST_STABLE: &rust_stable stable # Pinning the nightly version to a "stable" version to avoid CI breakages. - _RUST_NIGHTLY: &rust_nightly nightly-2025-11-11 + _RUST_NIGHTLY: &rust_nightly nightly-2026-02-28 # See: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#concurrency. # This will ensure that only one commit will be running tests at a time on each PR. @@ -198,7 +198,6 @@ jobs: - name: Install Rust toolchain uses: dtolnay/rust-toolchain@master with: - # branch coverage is currently optional and requires nightly toolchain: *rust_nightly components: llvm-tools-preview @@ -227,11 +226,13 @@ jobs: - name: Install cargo-llvm-cov uses: taiki-e/install-action@cargo-llvm-cov + # TODO: consider enabling branch coverage once it's supported in stable + # https://github.com/taiki-e/cargo-llvm-cov/issues/8 - name: Generate code coverage - run: cargo llvm-cov --all-features --workspace --branch --no-report -- --include-ignored + run: cargo llvm-cov --all-features --workspace --no-report -- --include-ignored - name: Generate code coverage - doctests - run: cargo llvm-cov --all-features --workspace --branch --doc --no-report + run: cargo llvm-cov --all-features --workspace --doc --no-report - name: Merge code coverage reports run: cargo llvm-cov report --codecov --output-path codecov.json diff --git a/cot/src/lib.rs b/cot/src/lib.rs index cc11ba1a..22ea64d5 100644 --- a/cot/src/lib.rs +++ b/cot/src/lib.rs @@ -84,6 +84,7 @@ pub(crate) mod utils; #[cfg(feature = "openapi")] pub use aide; +pub use bytes; /// A wrapper around a handler that's used in [`Bootstrapper`]. /// /// It is returned by [`Bootstrapper::finish`]. Typically, you don't need to @@ -181,9 +182,9 @@ pub use cot_macros::e2e_test; /// ``` pub use cot_macros::main; pub use cot_macros::test; +pub use http; #[cfg(feature = "openapi")] pub use schemars; -pub use {bytes, http}; pub use crate::__private::askama::{Template, filter_fn}; pub use crate::project::{