diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 17d0db3..babee82 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -37,7 +37,7 @@ jobs: name: Check runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Install toolchain uses: dtolnay/rust-toolchain@nightly with: @@ -46,7 +46,7 @@ jobs: - uses: taiki-e/install-action@v2 with: tool: typos-cli,taplo-cli,hawkeye - - run: cargo +nightly x lint + - run: cargo x lint test: name: Run tests @@ -56,7 +56,7 @@ jobs: rust-version: [ "1.85.0", "stable" ] runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 - uses: Swatinem/rust-cache@v2 - name: Delete rust-toolchain.toml run: rm rust-toolchain.toml diff --git a/xtask/src/main.rs b/xtask/src/main.rs index f65e769..b8a8de8 100644 --- a/xtask/src/main.rs +++ b/xtask/src/main.rs @@ -65,7 +65,7 @@ struct CommandTest { impl CommandTest { fn run(self) { - run_command(make_test_cmd(self.no_capture, true, &[])); + run_command(make_test_cmd(self.no_capture, &[])); } } @@ -130,12 +130,9 @@ fn make_build_cmd(locked: bool) -> StdCommand { cmd } -fn make_test_cmd(no_capture: bool, default_features: bool, features: &[&str]) -> StdCommand { +fn make_test_cmd(no_capture: bool, features: &[&str]) -> StdCommand { let mut cmd = find_command("cargo"); - cmd.args(["test", "--workspace"]); - if !default_features { - cmd.arg("--no-default-features"); - } + cmd.args(["test", "--workspace", "--no-default-features"]); if !features.is_empty() { cmd.args(["--features", features.join(",").as_str()]); } @@ -147,7 +144,7 @@ fn make_test_cmd(no_capture: bool, default_features: bool, features: &[&str]) -> fn make_format_cmd(fix: bool) -> StdCommand { let mut cmd = find_command("cargo"); - cmd.args(["fmt", "--all"]); + cmd.args(["+nightly", "fmt", "--all"]); if !fix { cmd.arg("--check"); } @@ -157,6 +154,7 @@ fn make_format_cmd(fix: bool) -> StdCommand { fn make_clippy_cmd(fix: bool) -> StdCommand { let mut cmd = find_command("cargo"); cmd.args([ + "+nightly", "clippy", "--tests", "--all-features",