From d4de2766dd36a0ab3789bc26926c746cecf72cf3 Mon Sep 17 00:00:00 2001 From: Mehul Date: Tue, 3 Dec 2024 22:11:00 -0500 Subject: [PATCH] feat: migrate to gh-workflow-tailcall --- Cargo.toml | 2 +- tests/ci.rs | 54 ++++++----------------------------------------------- 2 files changed, 7 insertions(+), 49 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index dc16900..7874087 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,7 +23,7 @@ jaq-std = { workspace = true } jaq-json = { workspace = true } [dev-dependencies] -gh-workflow = "0.4.1" +gh-workflow-tailcall = "0.1.3" pest = "2.7.14" pest_derive = {version = "2.7.14"} criterion = "0.5.1" diff --git a/tests/ci.rs b/tests/ci.rs index abcc146..1141095 100644 --- a/tests/ci.rs +++ b/tests/ci.rs @@ -1,52 +1,10 @@ -use gh_workflow::toolchain::Toolchain; -use gh_workflow::*; +use gh_workflow_tailcall::*; #[test] -fn generate() { - let flags = RustFlags::deny("warnings"); +fn generate_ci_workflow() { + let workflow = Workflow::default() + .auto_release(true) + .name("Build and Test".into()); - let build = Job::new("Build and Test") - .add_step(Step::checkout()) - .add_step( - Toolchain::default() - .add_stable() - .add_nightly() - .add_clippy() - .add_fmt(), - ) - .add_step( - Cargo::new("test") - .args("--all-features --workspace") - .name("Cargo Test"), - ) - .add_step(Cargo::new("bench").name("Cargo Bench")) - .add_step( - Cargo::new("fmt") - .nightly() - .args("--check") - .name("Cargo Fmt"), - ) - .add_step( - Cargo::new("clippy") - .nightly() - .args("--all-features --workspace -- -D warnings") - .name("Cargo Clippy"), - ); - - let event = Event::default() - .push(Push::default().add_branch("main")) - .pull_request( - PullRequest::default() - .add_type(PullRequestType::Opened) - .add_type(PullRequestType::Synchronize) - .add_type(PullRequestType::Reopened) - .add_branch("main"), - ); - - Workflow::new("Build and Test") - .add_env(flags) - .on(event) - .add_job("build", build) - .generate() - .unwrap(); + workflow.generate().unwrap(); }