ci: use dtolnay/rust-toolchain

This commit is contained in:
PoiScript 2023-11-24 16:21:44 +08:00
parent f8fd1306e2
commit 03756b95f9
No known key found for this signature in database
GPG key ID: 22C2B1249D99985E

View file

@ -10,36 +10,15 @@ jobs:
- name: Checkout code
uses: actions/checkout@master
- name: Install latest stable Rust
uses: actions-rs/toolchain@v1
- name: Setup rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
default: true
override: true
components: clippy, rustfmt
- name: Install minimal stable with clippy and rustfmt
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
components: rustfmt, clippy
- name: Run rustfmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: -- --check
- name: Run clippy
uses: actions-rs/cargo@v1
with:
command: clippy
- name: Run test
uses: actions-rs/cargo@v1
with:
command: test
args: --all-features
- run: |
cargo fmt -- --check
cargo test --all-features
cargo clippy
gh-pages:
if: github.ref == 'refs/heads/v0.10'