Skip to content

Commit 9751b6e

Browse files
authored
chore: run tracing-subscriber tests with all features (#3412)
## Motivation While investigating #3405, we found that some tests are not being run on CI. Specifically the `tracing-subscriber` tests that depend on non-default features. ## Solution This change adds 2 new `run` commands to the `test-features-stable` CI job, one with `nextest` and another for the doc tests. There is also 1 more `run` command to run the `tracing-mock` tests with all features (which is just `tracing-subscriber` right now, but safer to set all).
1 parent efa0169 commit 9751b6e

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

.github/workflows/CI.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,8 @@ jobs:
287287
steps:
288288
- uses: actions/checkout@v4
289289
- uses: dtolnay/rust-toolchain@stable
290+
- name: install cargo-nextest
291+
uses: taiki-e/install-action@nextest
290292
- name: "Test log support"
291293
run: cargo test
292294
- name: "Test static max level"
@@ -303,6 +305,14 @@ jobs:
303305
# as rustdoc isn't aware of cargo's feature flags.
304306
- name: "Test tracing-subscriber with all features disabled"
305307
run: cargo test --lib --tests --no-default-features
308+
- name: "Fix chrono version to 0.4.41"
309+
run: cargo update -p chrono --precise 0.4.41
310+
- name: "Test tracing-subscriber with all features enabled"
311+
run: cargo nextest run --profile ci --all-features -p tracing-subscriber
312+
- name: "Test tracing-subscriber docs with all features enabled"
313+
run: cargo test --doc --all-features -p tracing-subscriber
314+
- name: "Test tracing-mock with all features enabled"
315+
run: cargo test --all-features -p tracing-mock
306316

307317
# all required checks except for the main test run (which we only require
308318
# specific matrix combinations from)

tracing-subscriber/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ tracing-log = { path = "../tracing-log", version = "0.2.0" }
8181
criterion = { version = "0.3.6", default-features = false }
8282
regex = { version = "1", default-features = false, features = ["std"] }
8383
tracing-futures = { path = "../tracing-futures", version = "0.2.0", default-features = false, features = ["std-future", "std"] }
84-
tokio = { version = "1", features = ["rt", "macros"] }
84+
tokio = { version = "1", features = ["rt", "rt-multi-thread", "macros"] }
8585
# Enable the `time` crate's `macros` feature, for examples.
8686
time = { version = "0.3.2", features = ["formatting", "macros"] }
8787

0 commit comments

Comments
 (0)