Skip to content

Better error handling #229

Better error handling

Better error handling #229

Workflow file for this run

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