From a0b07f789439212f1950e3b67c04f2662263ccc3 Mon Sep 17 00:00:00 2001 From: Daniel Hofstetter Date: Mon, 22 Jan 2024 10:59:34 +0100 Subject: [PATCH 1/2] ci: use dtolnay/rust-toolchain instead of unmaintained actions_rs/toolchain --- .github/workflows/ci.yml | 28 +++++----------------------- 1 file changed, 5 insertions(+), 23 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ed00d90..5ba5288 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,11 +18,7 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 - name: Install Rust toolchain - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - profile: minimal - override: true + uses: dtolnay/rust-toolchain@stable - uses: Swatinem/rust-cache@v2 - uses: actions-rs/cargo@v1 with: @@ -36,11 +32,8 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 - name: Install Rust toolchain - uses: actions-rs/toolchain@v1 + uses: dtolnay/rust-toolchain@stable with: - toolchain: stable - profile: minimal - override: true components: rustfmt - uses: Swatinem/rust-cache@v2 - name: Check formatting @@ -56,11 +49,8 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 - name: Install Rust toolchain - uses: actions-rs/toolchain@v1 + uses: dtolnay/rust-toolchain@stable with: - toolchain: stable - profile: minimal - override: true components: clippy - uses: Swatinem/rust-cache@v2 - name: Clippy check @@ -76,11 +66,7 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 - name: Install Rust toolchain - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - profile: minimal - override: true + uses: dtolnay/rust-toolchain@stable - uses: Swatinem/rust-cache@v2 - name: Check documentation env: @@ -122,11 +108,7 @@ jobs: outputs CODECOV_FLAGS - name: rust toolchain ~ install - uses: actions-rs/toolchain@v1 - with: - toolchain: ${{ steps.vars.outputs.TOOLCHAIN }} - default: true - profile: minimal # minimal component installation (ie, no documentation) + uses: dtolnay/rust-toolchain@nightly - name: Test uses: actions-rs/cargo@v1 with: From 7631e14cff308b32ddd7ff83f0c7bf6864249e92 Mon Sep 17 00:00:00 2001 From: Daniel Hofstetter Date: Mon, 22 Jan 2024 11:05:04 +0100 Subject: [PATCH 2/2] ci: remove actions-rs/cargo & use cargo directly --- .github/workflows/ci.yml | 24 +++++------------------- 1 file changed, 5 insertions(+), 19 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5ba5288..216d904 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,10 +20,7 @@ jobs: - name: Install Rust toolchain uses: dtolnay/rust-toolchain@stable - uses: Swatinem/rust-cache@v2 - - uses: actions-rs/cargo@v1 - with: - command: test - args: --all-features --workspace + - run: cargo test --all-features --workspace rustfmt: name: Rustfmt @@ -37,10 +34,7 @@ jobs: components: rustfmt - uses: Swatinem/rust-cache@v2 - name: Check formatting - uses: actions-rs/cargo@v1 - with: - command: fmt - args: --all -- --check + run: cargo fmt --all -- --check clippy: name: Clippy @@ -54,10 +48,7 @@ jobs: components: clippy - uses: Swatinem/rust-cache@v2 - name: Clippy check - uses: actions-rs/cargo@v1 - with: - command: clippy - args: --all-targets --all-features --workspace -- -D warnings + run: cargo clippy --all-targets --all-features --workspace -- -D warnings docs: name: Docs @@ -71,9 +62,7 @@ jobs: - name: Check documentation env: RUSTDOCFLAGS: -D warnings - uses: actions-rs/cargo@v1 - with: - command: doc + run: cargo doc coverage: name: Code Coverage @@ -110,10 +99,7 @@ jobs: - name: rust toolchain ~ install uses: dtolnay/rust-toolchain@nightly - name: Test - uses: actions-rs/cargo@v1 - with: - command: test - args: ${{ steps.vars.outputs.CARGO_FEATURES_OPTION }} --no-fail-fast + run: cargo test ${{ steps.vars.outputs.CARGO_FEATURES_OPTION }} --no-fail-fast env: CARGO_INCREMENTAL: "0" RUSTC_WRAPPER: ""