Skip to content

Commit

Permalink
workflows: use dtolnay/rust-toolchain instead of actions-rs/toolchain
Browse files Browse the repository at this point in the history
  • Loading branch information
tkren committed Jun 11, 2024
1 parent 08c09dd commit 37e85c2
Showing 1 changed file with 8 additions and 31 deletions.
39 changes: 8 additions & 31 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,10 @@ jobs:
- uses: actions/checkout@v4
- name: Install dependencies
run: sudo apt-get install nettle-dev
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true
- uses: dtolnay/rust-toolchain@nightly
- uses: Swatinem/rust-cache@v2
- name: cargo check
uses: actions-rs/cargo@v1
with:
command: check
run: cargo check

lints:
name: Lints
Expand All @@ -28,23 +22,14 @@ jobs:
- uses: actions/checkout@v4
- name: Install dependencies
run: sudo apt-get install nettle-dev
- uses: actions-rs/toolchain@v1
- uses: dtolnay/rust-toolchain@nightly
with:
profile: minimal
toolchain: nightly
override: true
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v2
- name: cargo fmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: -v --all --check
run: cargo fmt -v --all --check
- name: cargo clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -D warnings
run: cargo clippy -- -D warnings

test:
name: Test
Expand All @@ -53,17 +38,9 @@ jobs:
- uses: actions/checkout@v4
- name: Install dependencies
run: sudo apt-get install nettle-dev
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true
- uses: dtolnay/rust-toolchain@nightly
- uses: Swatinem/rust-cache@v1
- name: cargo build
uses: actions-rs/cargo@v1
with:
command: build
run: cargo build
- name: cargo test
uses: actions-rs/cargo@v1
with:
command: test
run: cargo test

0 comments on commit 37e85c2

Please sign in to comment.