From 390f19546d526ca8011eda63dee4c1a6d1cc4551 Mon Sep 17 00:00:00 2001 From: Danny Goldberg Date: Thu, 3 Aug 2023 16:43:59 -0400 Subject: [PATCH 1/2] ATR-2626 s/actions-rs/dtolnay --- .github/workflows/rust-build-test.yaml | 4 +--- .github/workflows/rust-format-lint.yaml | 3 +-- .github/workflows/rust-openapi-changes.yaml | 4 +--- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/.github/workflows/rust-build-test.yaml b/.github/workflows/rust-build-test.yaml index 3312595..3a276b7 100644 --- a/.github/workflows/rust-build-test.yaml +++ b/.github/workflows/rust-build-test.yaml @@ -17,9 +17,7 @@ jobs: with: ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} - name: Install latest stable - uses: actions-rs/toolchain@v1 - with: - toolchain: stable + uses: dtolnay/rust-toolchain@stable - name: Run build uses: actions-rs/cargo@v1 with: diff --git a/.github/workflows/rust-format-lint.yaml b/.github/workflows/rust-format-lint.yaml index a07d993..0414ca7 100644 --- a/.github/workflows/rust-format-lint.yaml +++ b/.github/workflows/rust-format-lint.yaml @@ -18,9 +18,8 @@ jobs: with: ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} - name: Install latest stable - uses: actions-rs/toolchain@v1 + uses: dtolnay/rust-toolchain@stable with: - toolchain: stable components: rustfmt, clippy - name: Run rustfmt uses: actions-rs/cargo@v1 diff --git a/.github/workflows/rust-openapi-changes.yaml b/.github/workflows/rust-openapi-changes.yaml index ee3d1d6..88760c0 100644 --- a/.github/workflows/rust-openapi-changes.yaml +++ b/.github/workflows/rust-openapi-changes.yaml @@ -17,9 +17,7 @@ jobs: with: ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} - name: Install latest stable - uses: actions-rs/toolchain@v1 - with: - toolchain: stable + uses: dtolnay/rust-toolchain@stable - name: Copy openapi.yaml run: cp openapi.yaml openapi.yaml_bak shell: bash From d3977ae96cede220433df8dadf44157fa1d5e2a5 Mon Sep 17 00:00:00 2001 From: Danny Goldberg Date: Thu, 3 Aug 2023 16:45:59 -0400 Subject: [PATCH 2/2] use plain cargo rather than actions-rs/cargo There seem to be MANY forks of actions-rs/cargo, i.e. https://github.com/ructions/cargo, but none have very many stars and the [use cases](https://github.com/ructions/cargo#use-cases) don't seem particularly useful. So here's a try to see what a build looks like using plain `cargo` :rocket: --- .github/workflows/rust-build-test.yaml | 10 ++-------- .github/workflows/rust-format-lint.yaml | 9 ++------- .github/workflows/rust-openapi-changes.yaml | 5 +---- 3 files changed, 5 insertions(+), 19 deletions(-) diff --git a/.github/workflows/rust-build-test.yaml b/.github/workflows/rust-build-test.yaml index 3a276b7..170e77b 100644 --- a/.github/workflows/rust-build-test.yaml +++ b/.github/workflows/rust-build-test.yaml @@ -19,12 +19,6 @@ jobs: - name: Install latest stable uses: dtolnay/rust-toolchain@stable - name: Run build - uses: actions-rs/cargo@v1 - with: - command: build - args: --verbose + run: cargo build --verbose - name: Run test - uses: actions-rs/cargo@v1 - with: - command: test - args: --verbose + run: cargo test --verbose diff --git a/.github/workflows/rust-format-lint.yaml b/.github/workflows/rust-format-lint.yaml index 0414ca7..8b70034 100644 --- a/.github/workflows/rust-format-lint.yaml +++ b/.github/workflows/rust-format-lint.yaml @@ -22,11 +22,6 @@ jobs: with: components: rustfmt, clippy - name: Run rustfmt - uses: actions-rs/cargo@v1 - with: - command: fmt - args: --check + run: cargo fmt --check - name: Run clippy - uses: actions-rs/cargo@v1 - with: - command: clippy + run: cargo clippy diff --git a/.github/workflows/rust-openapi-changes.yaml b/.github/workflows/rust-openapi-changes.yaml index 88760c0..04eb29f 100644 --- a/.github/workflows/rust-openapi-changes.yaml +++ b/.github/workflows/rust-openapi-changes.yaml @@ -22,9 +22,6 @@ jobs: run: cp openapi.yaml openapi.yaml_bak shell: bash - name: Generate OpenAPI specification - uses: actions-rs/cargo@v1 - with: - command: run - args: --bin gen-openapi --verbose + run: cargo run --bin gen-openapi --verbose - name: Compare files run: diff --side-by-side openapi.yaml openapi.yaml_bak \ No newline at end of file