feat: update ci config & fix clippy warnings (#28) #49
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Auto Build | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
build: | |
name: Auto Build CI | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest, macOS-latest] | |
rust: [nightly, beta, stable] | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- name: Install Rust toolchain | |
run: | | |
rustup set profile minimal | |
rustup update --no-self-update ${{ matrix.rust }} | |
rustup component add --toolchain ${{ matrix.rust }} rustfmt clippy | |
rustup default ${{ matrix.rust }} | |
- name: Cargo Build | |
run: cargo build | |
- name: Cargo Test For tokio | |
run: cargo test --no-default-features --features runtime-tokio rt | |
- name: Cargo Test For async-std | |
run: cargo test --no-default-features --features runtime-async-std | |
- name: Cargo Clippy | |
run: cargo clippy -- -D warnings | |
- name: Cargo Fmt Check | |
run: cargo fmt --all -- --check |