From 658cac44cb86bfab608e852fbe9ba102fc3b9466 Mon Sep 17 00:00:00 2001 From: NexVeridian Date: Tue, 22 Oct 2024 16:19:07 -0700 Subject: [PATCH] ci: swap to cargo fmt nightly --- .github/workflows/demo-ci.yml | 5 +++-- .github/workflows/loco-cli.yml | 5 +++-- .github/workflows/loco-gen-ci.yml | 9 +++------ .github/workflows/loco-rs-ci.yml | 9 +++------ .github/workflows/starter-lightweight-service.yml | 5 +++-- .github/workflows/starter-rest-api.yml | 8 +++----- .github/workflows/starter-saas.yml | 5 +++-- starters/lightweight-service/.github/workflows/ci.yaml | 2 +- starters/rest-api/.github/workflows/ci.yaml | 2 +- starters/saas/.github/workflows/ci.yaml | 2 +- 10 files changed, 24 insertions(+), 28 deletions(-) diff --git a/.github/workflows/demo-ci.yml b/.github/workflows/demo-ci.yml index e2d9097b9..15bd9487c 100644 --- a/.github/workflows/demo-ci.yml +++ b/.github/workflows/demo-ci.yml @@ -22,11 +22,12 @@ jobs: uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@stable with: - toolchain: ${{ env.RUST_TOOLCHAIN }} + toolchain: nightly components: rustfmt - name: Setup Rust cache uses: Swatinem/rust-cache@v2 - - run: cargo fmt --all -- --check + - name: Run cargo fmt + run: cargo fmt --all -- --check working-directory: ./examples/demo - name: Run cargo clippy run: cargo clippy -- -W clippy::nursery -W clippy::pedantic -W rust-2018-idioms -W rust-2021-compatibility diff --git a/.github/workflows/loco-cli.yml b/.github/workflows/loco-cli.yml index 09f8874bb..0cbdf4ef6 100644 --- a/.github/workflows/loco-cli.yml +++ b/.github/workflows/loco-cli.yml @@ -22,11 +22,12 @@ jobs: uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@stable with: - toolchain: ${{ env.RUST_TOOLCHAIN }} + toolchain: nightly components: rustfmt - name: Setup Rust cache uses: Swatinem/rust-cache@v2 - - run: cargo fmt --all -- --check + - name: Run cargo fmt + run: cargo fmt --all -- --check working-directory: ./loco-cli - name: Run cargo clippy run: cargo clippy --all-features -- -D warnings -W clippy::pedantic -W clippy::nursery -W rust-2018-idioms diff --git a/.github/workflows/loco-gen-ci.yml b/.github/workflows/loco-gen-ci.yml index cf097c80e..8dedc7eb8 100644 --- a/.github/workflows/loco-gen-ci.yml +++ b/.github/workflows/loco-gen-ci.yml @@ -26,15 +26,12 @@ jobs: uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@stable with: - toolchain: ${{ env.RUST_TOOLCHAIN }} + toolchain: nightly components: rustfmt - name: Setup Rust cache uses: Swatinem/rust-cache@v2 - - name: Run cargo fmt - uses: actions-rs/cargo@v1 - with: - command: fmt - args: --all -- --check + - name: Run cargo fmt + run: cargo fmt --all -- --check - name: Run cargo clippy uses: actions-rs/cargo@v1 with: diff --git a/.github/workflows/loco-rs-ci.yml b/.github/workflows/loco-rs-ci.yml index 4c822a841..fa22bccf6 100644 --- a/.github/workflows/loco-rs-ci.yml +++ b/.github/workflows/loco-rs-ci.yml @@ -22,15 +22,12 @@ jobs: uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@stable with: - toolchain: ${{ env.RUST_TOOLCHAIN }} + toolchain: nightly components: rustfmt - name: Setup Rust cache uses: Swatinem/rust-cache@v2 - - name: Run cargo fmt - uses: actions-rs/cargo@v1 - with: - command: fmt - args: --all -- --check + - name: Run cargo fmt + run: cargo fmt --all -- --check - name: Run cargo clippy uses: actions-rs/cargo@v1 with: diff --git a/.github/workflows/starter-lightweight-service.yml b/.github/workflows/starter-lightweight-service.yml index c8f0d8ccd..170e3696e 100644 --- a/.github/workflows/starter-lightweight-service.yml +++ b/.github/workflows/starter-lightweight-service.yml @@ -26,11 +26,12 @@ jobs: uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@stable with: - toolchain: ${{ env.RUST_TOOLCHAIN }} + toolchain: nightly components: rustfmt - name: Setup Rust cache uses: Swatinem/rust-cache@v2 - - run: cargo fmt --all -- --check + - name: Run cargo fmt + run: cargo fmt --all -- --check working-directory: ./starters/lightweight-service - name: Run cargo clippy run: cargo clippy -- -W clippy::nursery -W clippy::pedantic -W rust-2018-idioms -W rust-2021-compatibility diff --git a/.github/workflows/starter-rest-api.yml b/.github/workflows/starter-rest-api.yml index 56f4d9b25..156dfe138 100644 --- a/.github/workflows/starter-rest-api.yml +++ b/.github/workflows/starter-rest-api.yml @@ -26,14 +26,12 @@ jobs: uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@stable with: - toolchain: ${{ env.RUST_TOOLCHAIN }} + toolchain: nightly components: rustfmt - name: Setup Rust cache uses: Swatinem/rust-cache@v2 - - run: cargo fmt --all -- --check - working-directory: ./starters/rest-api - - name: Run cargo clippy - run: cargo clippy -- -W clippy::nursery -W clippy::pedantic -W rust-2018-idioms -W rust-2021-compatibility + - name: Run cargo fmt + run: cargo fmt --all -- --check working-directory: ./starters/rest-api test: diff --git a/.github/workflows/starter-saas.yml b/.github/workflows/starter-saas.yml index a59e0be4f..5dc875ce4 100644 --- a/.github/workflows/starter-saas.yml +++ b/.github/workflows/starter-saas.yml @@ -26,11 +26,12 @@ jobs: uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@stable with: - toolchain: ${{ env.RUST_TOOLCHAIN }} + toolchain: nightly components: rustfmt - name: Setup Rust cache uses: Swatinem/rust-cache@v2 - - run: cargo fmt --all -- --check + - name: Run cargo fmt + run: cargo fmt --all -- --check working-directory: ./starters/saas - name: Run cargo clippy run: cargo clippy -- -W clippy::nursery -W clippy::pedantic -W rust-2018-idioms -W rust-2021-compatibility diff --git a/starters/lightweight-service/.github/workflows/ci.yaml b/starters/lightweight-service/.github/workflows/ci.yaml index 960630bba..1827c7a6e 100644 --- a/starters/lightweight-service/.github/workflows/ci.yaml +++ b/starters/lightweight-service/.github/workflows/ci.yaml @@ -23,7 +23,7 @@ jobs: uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@stable with: - toolchain: ${{ env.RUST_TOOLCHAIN }} + toolchain: nightly components: rustfmt - name: Run cargo fmt uses: actions-rs/cargo@v1 diff --git a/starters/rest-api/.github/workflows/ci.yaml b/starters/rest-api/.github/workflows/ci.yaml index b2e3e1162..13cd173f1 100644 --- a/starters/rest-api/.github/workflows/ci.yaml +++ b/starters/rest-api/.github/workflows/ci.yaml @@ -23,7 +23,7 @@ jobs: uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@stable with: - toolchain: ${{ env.RUST_TOOLCHAIN }} + toolchain: nightly components: rustfmt - name: Run cargo fmt uses: actions-rs/cargo@v1 diff --git a/starters/saas/.github/workflows/ci.yaml b/starters/saas/.github/workflows/ci.yaml index 75ba8a5e3..ce6c5a065 100644 --- a/starters/saas/.github/workflows/ci.yaml +++ b/starters/saas/.github/workflows/ci.yaml @@ -23,7 +23,7 @@ jobs: uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@stable with: - toolchain: ${{ env.RUST_TOOLCHAIN }} + toolchain: nightly components: rustfmt - name: Run cargo fmt uses: actions-rs/cargo@v1