Skip to content

Commit

Permalink
Migrate workflows out of deprecated rust actions (#85)
Browse files Browse the repository at this point in the history
  • Loading branch information
martinmr authored Nov 21, 2023
1 parent e2d801b commit d2edac8
Showing 1 changed file with 21 additions and 37 deletions.
58 changes: 21 additions & 37 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
run: cargo doc --workspace --all-features --no-deps --document-private-items

0 comments on commit d2edac8

Please sign in to comment.