diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 372a462..685e32a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -51,8 +51,22 @@ jobs: - run: cargo doc --no-deps + todo-or-die: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + + - run: rustup default nightly && rustup update nightly + + - run: > + echo -e "\n[dev-dependencies]\ntodo-or-die = {version = \"0.1\", features = [\"github\"]}\n\n[features]\ntodoordie = []" >> tracked-impl/Cargo.toml + + - run: cargo test --features todoordie -- --nocapture + working-directory: "tracked-impl" + publish: - needs: [checklinks, test] + needs: [checklinks, test, todo-or-die] runs-on: ubuntu-latest if: ${{ startsWith(github.event.head_commit.message, 'tracked@') && github.event_name == 'push' && github.ref == 'refs/heads/main' }} diff --git a/tracked-impl/Cargo.toml b/tracked-impl/Cargo.toml index 1f6eaed..69ac861 100644 --- a/tracked-impl/Cargo.toml +++ b/tracked-impl/Cargo.toml @@ -13,10 +13,3 @@ proc-macro = true [dependencies] quote = "1" syn = {version = "2", features = ["full", "visit-mut"]} - -[dev-dependencies] -log = "=0.4.18" # 0.4.19 is MSRV 1.60 -tokio = "=1.29" # 1.30 is MSRV 1.63 -h2 = "=0.3.20" # 0.3.21 is MSRV 1.63 -chrono = "=0.4.26" # 0.4.27 is MSRV 1.57 -todo-or-die = {version = "0.1", features = ["github"]} diff --git a/tracked-impl/src/lib.rs b/tracked-impl/src/lib.rs index 2a80e11..ca9f413 100644 --- a/tracked-impl/src/lib.rs +++ b/tracked-impl/src/lib.rs @@ -48,7 +48,7 @@ pub fn tracked( ) -> proc_macro::TokenStream { let mut new_fn = syn::parse_macro_input!(input as syn::ItemFn); TrackReplace(new_fn.sig.ident.to_string()).visit_block_mut(&mut new_fn.block); - #[cfg(test)] + #[cfg(all(test, feature = "todoordie"))] // #[allow(clippy::needless_question_mark)] should be on expression instead of whole fn todo_or_die::issue_closed!("rust-lang", "rust", 15701); let output = quote! {