Skip to content

Commit

Permalink
move todo-or-die to CI nightly only
Browse files Browse the repository at this point in the history
  • Loading branch information
trevyn committed Sep 23, 2023
1 parent 0583089 commit 0da9e3c
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 9 deletions.
16 changes: 15 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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' }}

Expand Down
7 changes: 0 additions & 7 deletions tracked-impl/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]}
2 changes: 1 addition & 1 deletion tracked-impl/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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! {
Expand Down

0 comments on commit 0da9e3c

Please sign in to comment.