Better error handling #222
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: Rust | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
env: | |
MSRV: 1.80.0 | |
jobs: | |
build: | |
name: Build and Test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Rust toolchain | |
run: | | |
rustup toolchain install $MSRV | |
rustup override set $MSRV | |
rustup component add clippy | |
rustup show active-toolchain -v | |
- uses: denoland/setup-deno@v2 | |
with: | |
deno-version: v2.x | |
- name: Cache | |
uses: Swatinem/rust-cache@v2 | |
- name: Build | |
run: | | |
cargo build --all-features | |
- name: Run cargo check (all features) | |
run: | | |
cargo check --benches --examples --tests --all-features | |
- name: Run cargo check (no features) | |
run: | | |
cargo check --benches --examples --tests --no-default-features | |
- name: Run cargo clippy | |
run: | | |
cargo clippy --benches --examples --tests --all-features -- -D warnings | |
- name: Test | |
run: | | |
cargo test --all-features | |
docs: | |
name: Build Docs | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Rust toolchain | |
run: | | |
rustup toolchain install nightly | |
rustup override set nightly | |
rustup show active-toolchain -v | |
- name: Cache | |
uses: Swatinem/rust-cache@v2 | |
- name: Build Docs | |
env: | |
RUSTDOCFLAGS: --cfg docsrs | |
run: | | |
cargo doc --all-features | |
format: | |
name: Check Format | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Rust toolchain | |
run: | | |
rustup toolchain install stable | |
rustup override set stable | |
rustup show active-toolchain -v | |
- name: Format | |
run: | | |
cargo fmt --check |