Skip to content

Commit

Permalink
use dtolnay/rust-toolchain (#49)
Browse files Browse the repository at this point in the history
  • Loading branch information
mrhooray authored Dec 17, 2022
1 parent fbcfe72 commit 7f03078
Showing 1 changed file with 8 additions and 23 deletions.
31 changes: 8 additions & 23 deletions .github/workflows/rust.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: rust

on:
push:
branches: [ master ]
branches: [master]
pull_request:
branches: [ master ]
branches: [master]

env:
CARGO_TERM_COLOR: always
Expand All @@ -14,22 +14,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
- uses: dtolnay/rust-toolchain@stable
with:
profile: minimal
toolchain: stable
override: true
components: rustfmt, clippy
- name: fmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
- name: clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -Dwarnings
- run: cargo fmt --all --check
- run: cargo clippy -- -Dwarnings
test:
runs-on: ubuntu-latest
strategy:
Expand All @@ -39,12 +29,7 @@ jobs:
- stable
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
- name: test
uses: actions-rs/cargo@v1
- uses: dtolnay/rust-toolchain@stable
with:
command: test
toolchain: ${{matrix.rust}}
- run: cargo test --all-features

0 comments on commit 7f03078

Please sign in to comment.