Skip to content
Open
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
16 changes: 16 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,21 @@ jobs:
- name: "Test tracing-mock with all features enabled"
run: cargo test --all-features -p tracing-mock

check-tracing-macros-stable:
# Feature flag tests that run on stable Rust.
name: cargo check (tracing macros)
needs: check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: "Generate macro tests"
run: cargo run --bin xtask -- gen-macro-tests
- name: "Check tracing macro invocations ("
# TODO(hds): remove `|| true` when all macros compile
run: cargo check --tests || true
working-directory: "tracing/test-macros"

# all required checks except for the main test run (which we only require
# specific matrix combinations from)
all_required:
Expand All @@ -326,5 +341,6 @@ jobs:
- test-build-wasm
- test-wasm
- test-features-stable
- check-tracing-macros-stable
steps:
- run: exit 0
3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ members = [
"tracing-test",
"tracing-appender",
"tracing-journald",
"examples"
"examples",
"xtask",
]

# This will be ignored with Rust older than 1.74, but for now that's okay;
Expand Down
10 changes: 10 additions & 0 deletions tracing/test-macros/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[workspace]

[package]
name = "test-macros"
version = "0.1.0"
publish = false
edition = "2018"

[dependencies]
tracing = { path = ".." }
1 change: 1 addition & 0 deletions tracing/test-macros/tests/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*
11 changes: 11 additions & 0 deletions xtask/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[package]
name = "xtask"
version = "0.1.0"
edition = "2018"
publish = false

[dependencies]
clap = { version = "4.5", features = ["derive"] }

[lints]
workspace = true
Loading
Loading