From d2edac81cd54f84322c4ee31b8353776429b5b1f Mon Sep 17 00:00:00 2001 From: Martin Martinez Rivera Date: Mon, 20 Nov 2023 19:43:25 -0800 Subject: [PATCH] Migrate workflows out of deprecated rust actions (#85) --- .github/workflows/build.yml | 58 ++++++++++++++----------------------- 1 file changed, 21 insertions(+), 37 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 04891cf..c1bccc9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -8,29 +8,21 @@ on: jobs: test: name: Test Suite - strategy: - matrix: - os: [ubuntu-latest] - rust: [stable] - runs-on: ${{ matrix.os }} + runs-on: ubuntu-stable steps: - name: Checkout sources uses: actions/checkout@v2 - + - name: Install stable toolchain - uses: actions-rs/toolchain@v1 + uses: dtolnay/rust-toolchain@master with: - profile: minimal - toolchain: ${{ matrix.rust }} - override: true - - - uses: Swatinem/rust-cache@v2 + toolchain: 1.73.0 + + - name: Setup Rust cache + uses: Swatinem/rust-cache@v2 - name: Run cargo test - uses: actions-rs/cargo@v1 - with: - command: test - args: --release + run: cargo test lints: name: Lints @@ -40,33 +32,25 @@ jobs: uses: actions/checkout@v2 with: submodules: true - + - name: Install stable toolchain - uses: actions-rs/toolchain@v1 + uses: dtolnay/rust-toolchain@master with: - profile: minimal - toolchain: stable - override: true - components: rustfmt, clippy - - - uses: Swatinem/rust-cache@v2 - + toolchain: 1.73.0 + + - name: Install extra components + run: rustup component add clippy rust-docs rustfmt + + - name: Setup Rust cache + uses: Swatinem/rust-cache@v2 + - name: Run cargo fmt - uses: actions-rs/cargo@v1 - with: - command: fmt - args: --all -- --check + run: cargo fmt --all -- --check - name: Run cargo clippy - uses: actions-rs/cargo@v1 - with: - command: clippy - args: -- -D warnings + run: cargo clippy -- -D warnings - name: Run rustdoc lints - uses: actions-rs/cargo@v1 env: RUSTDOCFLAGS: "-D missing_docs -D rustdoc::missing_doc_code_examples" - with: - command: doc - args: --workspace --all-features --no-deps --document-private-items \ No newline at end of file + run: cargo doc --workspace --all-features --no-deps --document-private-items