Skip to content

Commit

Permalink
chore: setup toolchain
Browse files Browse the repository at this point in the history
  • Loading branch information
tusharmath committed Dec 11, 2024
1 parent 9833218 commit c38f1e2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@ jobs:
- name: Setup Rust Toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable, nightly
components: clippy, rustfmt
toolchain: stable
- name: Cargo Test
run: cargo test --all-features --workspace
lint:
Expand All @@ -53,6 +52,11 @@ jobs:
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Setup Rust Toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: nightly
components: clippy, rustfmt
- name: Cargo Fmt
run: cargo +nightly fmt --all
- name: Cargo Clippy
Expand Down
9 changes: 2 additions & 7 deletions crates/gh-workflow-tailcall/src/workflow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ impl Workflow {
Job::new("Lint")
.permissions(Permissions::default().contents(Level::Read))
.add_step(Step::checkout())
.add_step(Toolchain::default().add_nightly().add_clippy().add_fmt())
.add_step_when(!self.auto_fix, cargo_fmt)
.add_step_when(self.auto_fix, cargo_fmt_fix)
.add_step_when(!self.auto_fix, cargo_clippy)
Expand All @@ -118,13 +119,7 @@ impl Workflow {
Job::new("Build and Test")
.permissions(Permissions::default().contents(Level::Read))
.add_step(Step::checkout())
.add_step(
Toolchain::default()
.add_stable()
.add_nightly()
.add_clippy()
.add_fmt(),
)
.add_step(Toolchain::default().add_stable())
.add_step(
Cargo::new("test")
.args("--all-features --workspace")
Expand Down

0 comments on commit c38f1e2

Please sign in to comment.