From 5834e01c6629e1b7bbcc6cb746b2cccd91f5472d Mon Sep 17 00:00:00 2001 From: tottoto Date: Thu, 22 Jun 2023 18:16:23 +0900 Subject: [PATCH 1/6] Replace actions-rs/toolchain with dtolnay/rust-toolchain --- .github/workflows/CI.yml | 36 +++++++----------------------------- 1 file changed, 7 insertions(+), 29 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 7e8e75d6..643662a2 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -11,11 +11,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@master - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - profile: minimal - override: true + - uses: dtolnay/rust-toolchain@stable - name: Check uses: actions-rs/cargo@v1 with: @@ -26,10 +22,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@master - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - profile: minimal + - uses: dtolnay/rust-toolchain@stable - name: cargo doc working-directory: ${{ matrix.subcrate }} env: @@ -40,10 +33,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@master - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - profile: minimal + - uses: dtolnay/rust-toolchain@stable - name: Install cargo-hack run: | curl -LsSf https://github.com/taiki-e/cargo-hack/releases/latest/download/cargo-hack-x86_64-unknown-linux-gnu.tar.gz | tar xzf - -C ~/.cargo/bin @@ -62,11 +52,9 @@ jobs: rust: [stable, beta, nightly] steps: - uses: actions/checkout@master - - uses: actions-rs/toolchain@v1 + - uses: dtolnay/rust-toolchain@master with: toolchain: ${{ matrix.rust }} - profile: minimal - override: true - name: Run tests uses: actions-rs/cargo@v1 with: @@ -78,11 +66,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@master - - uses: actions-rs/toolchain@v1 - with: - toolchain: 1.60.0 - profile: minimal - override: true + - uses: dtolnay/rust-toolchain@1.60.0 - name: Run tests uses: actions-rs/cargo@v1 with: @@ -95,11 +79,9 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@master - - uses: actions-rs/toolchain@v1 + - uses: dtolnay/rust-toolchain@stable with: - toolchain: stable components: rustfmt - profile: minimal - name: rustfmt uses: actions-rs/cargo@v1 with: @@ -126,11 +108,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@master - - uses: dtolnay/rust-toolchain@stable - with: - toolchain: nightly - override: true - profile: minimal + - uses: dtolnay/rust-toolchain@nightly - uses: Swatinem/rust-cache@v1 - name: Install cargo-public-api-crates run: | From 97e91b1ee570527d694f4137aaa92107aec3dff5 Mon Sep 17 00:00:00 2001 From: tottoto Date: Thu, 22 Jun 2023 19:09:12 +0900 Subject: [PATCH 2/6] Replace actions-rs/cargo with run --- .github/workflows/CI.yml | 25 ++++--------------------- 1 file changed, 4 insertions(+), 21 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 643662a2..c1459d2f 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -12,11 +12,7 @@ jobs: steps: - uses: actions/checkout@master - uses: dtolnay/rust-toolchain@stable - - name: Check - uses: actions-rs/cargo@v1 - with: - command: check - args: --workspace --all-features --all-targets + - run: cargo check --workspace --all-features --all-targets check-docs: runs-on: ubuntu-latest @@ -55,11 +51,7 @@ jobs: - uses: dtolnay/rust-toolchain@master with: toolchain: ${{ matrix.rust }} - - name: Run tests - uses: actions-rs/cargo@v1 - with: - command: test - args: --workspace --all-features + - run: cargo test --workspace --all-features test-msrv: needs: check @@ -67,12 +59,7 @@ jobs: steps: - uses: actions/checkout@master - uses: dtolnay/rust-toolchain@1.60.0 - - name: Run tests - uses: actions-rs/cargo@v1 - with: - command: test - args: -p tower-http --all-features - toolchain: 1.60.0 + - run: cargo test -p tower-http --all-features style: needs: check @@ -82,11 +69,7 @@ jobs: - uses: dtolnay/rust-toolchain@stable with: components: rustfmt - - name: rustfmt - uses: actions-rs/cargo@v1 - with: - command: fmt - args: --all -- --check + - run: cargo fmt --all --check deny-check: name: cargo-deny check From eb9768ebbb40c7fd6748b4b1c82558743277379e Mon Sep 17 00:00:00 2001 From: tottoto Date: Thu, 22 Jun 2023 19:10:00 +0900 Subject: [PATCH 3/6] Update Swatinem/rust-cache to v2 --- .github/workflows/CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index c1459d2f..d6567fb0 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -92,7 +92,7 @@ jobs: steps: - uses: actions/checkout@master - uses: dtolnay/rust-toolchain@nightly - - uses: Swatinem/rust-cache@v1 + - uses: Swatinem/rust-cache@v2 - name: Install cargo-public-api-crates run: | cargo install --git https://github.com/davidpdrsn/cargo-public-api-crates From 8c6c9bd22a46859db67468b45b0340c8fce622a0 Mon Sep 17 00:00:00 2001 From: tottoto Date: Thu, 22 Jun 2023 19:35:37 +0900 Subject: [PATCH 4/6] Fix yaml indent style --- .github/workflows/CI.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index d6567fb0..859a2600 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -78,14 +78,14 @@ jobs: strategy: matrix: checks: - - advisories - - bans licenses sources + - advisories + - bans licenses sources steps: - - uses: actions/checkout@v2 - - uses: EmbarkStudios/cargo-deny-action@v1 - with: - command: check ${{ matrix.checks }} - arguments: --all-features --manifest-path tower-http/Cargo.toml + - uses: actions/checkout@v2 + - uses: EmbarkStudios/cargo-deny-action@v1 + with: + command: check ${{ matrix.checks }} + arguments: --all-features --manifest-path tower-http/Cargo.toml cargo-public-api-crates: runs-on: ubuntu-latest From 6c6469cce276b15e4fdd2d3041f94b93fb7073ad Mon Sep 17 00:00:00 2001 From: tottoto Date: Thu, 22 Jun 2023 19:40:10 +0900 Subject: [PATCH 5/6] Use stable version of actions/checkout --- .github/workflows/CI.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 859a2600..dabf2cfb 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -10,14 +10,14 @@ jobs: check: runs-on: ubuntu-latest steps: - - uses: actions/checkout@master + - uses: actions/checkout@v3 - uses: dtolnay/rust-toolchain@stable - run: cargo check --workspace --all-features --all-targets check-docs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@master + - uses: actions/checkout@v3 - uses: dtolnay/rust-toolchain@stable - name: cargo doc working-directory: ${{ matrix.subcrate }} @@ -28,7 +28,7 @@ jobs: cargo-hack: runs-on: ubuntu-latest steps: - - uses: actions/checkout@master + - uses: actions/checkout@v3 - uses: dtolnay/rust-toolchain@stable - name: Install cargo-hack run: | @@ -47,7 +47,7 @@ jobs: matrix: rust: [stable, beta, nightly] steps: - - uses: actions/checkout@master + - uses: actions/checkout@v3 - uses: dtolnay/rust-toolchain@master with: toolchain: ${{ matrix.rust }} @@ -57,7 +57,7 @@ jobs: needs: check runs-on: ubuntu-latest steps: - - uses: actions/checkout@master + - uses: actions/checkout@v3 - uses: dtolnay/rust-toolchain@1.60.0 - run: cargo test -p tower-http --all-features @@ -65,7 +65,7 @@ jobs: needs: check runs-on: ubuntu-latest steps: - - uses: actions/checkout@master + - uses: actions/checkout@v3 - uses: dtolnay/rust-toolchain@stable with: components: rustfmt @@ -81,7 +81,7 @@ jobs: - advisories - bans licenses sources steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - uses: EmbarkStudios/cargo-deny-action@v1 with: command: check ${{ matrix.checks }} @@ -90,7 +90,7 @@ jobs: cargo-public-api-crates: runs-on: ubuntu-latest steps: - - uses: actions/checkout@master + - uses: actions/checkout@v3 - uses: dtolnay/rust-toolchain@nightly - uses: Swatinem/rust-cache@v2 - name: Install cargo-public-api-crates From bf8ad5b20dace967b5cb17a12c75f7e98738c8cd Mon Sep 17 00:00:00 2001 From: tottoto Date: Thu, 22 Jun 2023 19:42:24 +0900 Subject: [PATCH 6/6] Use taiki-e/install-action to install cargo-hack --- .github/workflows/CI.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index dabf2cfb..a689ef4a 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -30,9 +30,7 @@ jobs: steps: - uses: actions/checkout@v3 - uses: dtolnay/rust-toolchain@stable - - name: Install cargo-hack - run: | - curl -LsSf https://github.com/taiki-e/cargo-hack/releases/latest/download/cargo-hack-x86_64-unknown-linux-gnu.tar.gz | tar xzf - -C ~/.cargo/bin + - uses: taiki-e/install-action@cargo-hack - name: cargo hack check working-directory: ${{ matrix.subcrate }} env: