From bfdcecfb823fee321900f856cd4483bcbb32039a Mon Sep 17 00:00:00 2001 From: Adam Andersson Date: Wed, 10 May 2023 09:35:57 +0200 Subject: [PATCH 1/4] bump actions/checkout to v3 --- .github/workflows/test.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index bd47349d..defa2485 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -17,7 +17,7 @@ jobs: rust: - nightly steps: - - uses: actions/checkout@v2.4.0 + - uses: actions/checkout@v3 - uses: actions-rs/toolchain@v1.0.7 with: profile: minimal @@ -35,7 +35,7 @@ jobs: rust: - nightly steps: - - uses: actions/checkout@v2.4.0 + - uses: actions/checkout@v3 - uses: actions-rs/toolchain@v1.0.7 with: profile: minimal @@ -53,7 +53,7 @@ jobs: rust: - nightly steps: - - uses: actions/checkout@v2.4.0 + - uses: actions/checkout@v3 - uses: actions-rs/toolchain@v1.0.7 with: profile: minimal @@ -71,7 +71,7 @@ jobs: name: Rustfmt runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2.4.0 + - uses: actions/checkout@v3 - uses: actions-rs/toolchain@v1.0.7 with: profile: minimal @@ -91,7 +91,7 @@ jobs: rust: - nightly steps: - - uses: actions/checkout@v2.4.0 + - uses: actions/checkout@v3 - uses: actions-rs/toolchain@v1.0.7 with: profile: minimal @@ -107,7 +107,7 @@ jobs: name: Typos runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2.4.0 + - uses: actions/checkout@v3 - uses: crate-ci/typos@v1.0.4 with: config: ./.typos.toml From eb6fc0dff15f94800cf0a8b2a084874da88dfb87 Mon Sep 17 00:00:00 2001 From: Adam Andersson Date: Wed, 10 May 2023 10:49:49 +0200 Subject: [PATCH 2/4] use dtolnay/rust-toolchain instead of actions-rs/toolchain --- .github/workflows/test.yml | 63 ++++++-------------------------------- 1 file changed, 10 insertions(+), 53 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index defa2485..961242f0 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -12,38 +12,18 @@ jobs: check: name: Check runs-on: ubuntu-latest - strategy: - matrix: - rust: - - nightly steps: - uses: actions/checkout@v3 - - uses: actions-rs/toolchain@v1.0.7 - with: - profile: minimal - toolchain: ${{ matrix.rust }} - override: true - - uses: actions-rs/cargo@v1.0.3 - with: - command: check + - uses: dtolnay/rust-toolchain@nightly + - run: cargo check test: name: Test runs-on: ubuntu-latest - strategy: - matrix: - rust: - - nightly steps: - uses: actions/checkout@v3 - - uses: actions-rs/toolchain@v1.0.7 - with: - profile: minimal - toolchain: ${{ matrix.rust }} - override: true - - uses: actions-rs/cargo@v1.0.3 - with: - command: test + - uses: dtolnay/rust-toolchain@nightly + - run: cargo test deploy: name: Deploy @@ -54,54 +34,31 @@ jobs: - nightly steps: - uses: actions/checkout@v3 - - uses: actions-rs/toolchain@v1.0.7 - with: - profile: minimal - toolchain: ${{ matrix.rust }} - override: true + - uses: dtolnay/rust-toolchain@nightly - uses: actions/setup-node@v3 with: node-version-file: '.nvmrc' - - uses: actions-rs/cargo@v1.0.3 - with: - command: xtask - args: deploy --check + - run: cargo xtask deploy --check rustfmt: name: Rustfmt runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - uses: actions-rs/toolchain@v1.0.7 + - uses: dtolnay/rust-toolchain@nightly with: - profile: minimal - toolchain: nightly components: rustfmt - override: true - - uses: actions-rs/cargo@v1.0.3 - with: - command: fmt - args: --check + - run: cargo fmt --check clippy: name: Clippy runs-on: ubuntu-latest - strategy: - matrix: - rust: - - nightly steps: - uses: actions/checkout@v3 - - uses: actions-rs/toolchain@v1.0.7 + - uses: dtolnay/rust-toolchain@nightly with: - profile: minimal - toolchain: ${{ matrix.rust }} components: clippy - override: true - - uses: actions-rs/cargo@v1.0.3 - with: - command: clippy - args: -- -Dwarnings + - run: cargo clippy -- -Dwarnings typos: name: Typos From 17c0b84e6aec06874cb9434b6d520701599e19b4 Mon Sep 17 00:00:00 2001 From: Adam Andersson Date: Wed, 10 May 2023 11:20:21 +0200 Subject: [PATCH 3/4] remove unused strategy --- .github/workflows/test.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 961242f0..cd763802 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -28,10 +28,6 @@ jobs: deploy: name: Deploy runs-on: ubuntu-latest - strategy: - matrix: - rust: - - nightly steps: - uses: actions/checkout@v3 - uses: dtolnay/rust-toolchain@nightly From 500047a1d99c4d411355a523d0c5bf5fc5742770 Mon Sep 17 00:00:00 2001 From: Adam Andersson Date: Wed, 10 May 2023 13:52:05 +0200 Subject: [PATCH 4/4] cache dependencies --- .github/workflows/test.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index cd763802..d1dd70b6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -15,6 +15,7 @@ jobs: steps: - uses: actions/checkout@v3 - uses: dtolnay/rust-toolchain@nightly + - uses: Swatinem/rust-cache@v2 - run: cargo check test: @@ -23,6 +24,7 @@ jobs: steps: - uses: actions/checkout@v3 - uses: dtolnay/rust-toolchain@nightly + - uses: Swatinem/rust-cache@v2 - run: cargo test deploy: @@ -31,6 +33,7 @@ jobs: steps: - uses: actions/checkout@v3 - uses: dtolnay/rust-toolchain@nightly + - uses: Swatinem/rust-cache@v2 - uses: actions/setup-node@v3 with: node-version-file: '.nvmrc' @@ -44,6 +47,7 @@ jobs: - uses: dtolnay/rust-toolchain@nightly with: components: rustfmt + - uses: Swatinem/rust-cache@v2 - run: cargo fmt --check clippy: @@ -54,6 +58,7 @@ jobs: - uses: dtolnay/rust-toolchain@nightly with: components: clippy + - uses: Swatinem/rust-cache@v2 - run: cargo clippy -- -Dwarnings typos: