From 3c32dd4ea7c6910b376faa827224f514d72eb18e Mon Sep 17 00:00:00 2001 From: Daniel Hofstetter Date: Sat, 10 Feb 2024 15:31:53 +0100 Subject: [PATCH 1/2] ci: remove actions-rs/cargo & use cargo directly --- .github/workflows/ci.yml | 23 +++++------------------ 1 file changed, 5 insertions(+), 18 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 33f1bc4..d93d582 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,9 +19,7 @@ jobs: profile: minimal toolchain: stable override: true - - uses: actions-rs/cargo@v1 - with: - command: check + - run: cargo check test: name: cargo test @@ -36,9 +34,7 @@ jobs: profile: minimal toolchain: stable override: true - - uses: actions-rs/cargo@v1 - with: - command: test + - run: cargo test fmt: name: cargo fmt --all -- --check @@ -51,10 +47,7 @@ jobs: toolchain: stable override: true - run: rustup component add rustfmt - - uses: actions-rs/cargo@v1 - with: - command: fmt - args: --all -- --check + - run: cargo fmt --all -- --check clippy: name: cargo clippy -- -D warnings @@ -70,10 +63,7 @@ jobs: toolchain: stable override: true - run: rustup component add clippy - - uses: actions-rs/cargo@v1 - with: - command: clippy - args: -- -D warnings + - run: cargo clippy -- -D warnings coverage: name: Code Coverage @@ -114,10 +104,7 @@ jobs: default: true profile: minimal # minimal component installation (ie, no documentation) - 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: "" From 126881f3cfc811006ab10525687cad73dcde51df Mon Sep 17 00:00:00 2001 From: Daniel Hofstetter Date: Sat, 10 Feb 2024 15:35:47 +0100 Subject: [PATCH 2/2] ci: use dtolnay/rust-toolchain instead of unmaintained actions-rs/toolchain --- .github/workflows/ci.yml | 30 +++++------------------------- 1 file changed, 5 insertions(+), 25 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d93d582..03fc854 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,11 +14,7 @@ jobs: os: [ubuntu-latest, macOS-latest, windows-latest] steps: - uses: actions/checkout@v4 - - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - override: true + - uses: dtolnay/rust-toolchain@stable - run: cargo check test: @@ -29,11 +25,7 @@ jobs: os: [ubuntu-latest, macOS-latest, windows-latest] steps: - uses: actions/checkout@v4 - - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - override: true + - uses: dtolnay/rust-toolchain@stable - run: cargo test fmt: @@ -41,11 +33,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - override: true + - uses: dtolnay/rust-toolchain@stable - run: rustup component add rustfmt - run: cargo fmt --all -- --check @@ -57,11 +45,7 @@ jobs: os: [ubuntu-latest, macOS-latest, windows-latest] steps: - uses: actions/checkout@v4 - - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - override: true + - uses: dtolnay/rust-toolchain@stable - run: rustup component add clippy - run: cargo clippy -- -D warnings @@ -98,11 +82,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 run: cargo test ${{ steps.vars.outputs.CARGO_FEATURES_OPTION }} --no-fail-fast env: