name: CI
on:
push:
branches: [main, dev]
pull_request:
branches: [main, dev]
env:
CARGO_TERM_COLOR: always
RUSTFLAGS: "-D warnings"
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
jobs:
check:
name: Check
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
rust: [stable, "1.75.0"]
steps:
- uses: actions/checkout@v5
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
components: clippy, rustfmt
- name: Cache
uses: Swatinem/rust-cache@v2
with:
key: ${{ matrix.os }}-${{ matrix.rust }}
- name: MSRV check (library only)
if: matrix.rust == '1.75.0'
run: cargo check --lib --all-features
- name: fmt
if: matrix.rust == 'stable'
run: cargo fmt --all -- --check
- name: clippy (all features)
if: matrix.rust == 'stable'
run: cargo clippy --all-targets --all-features -- -D warnings
- name: clippy (no default features)
if: matrix.rust == 'stable'
run: cargo clippy --all-targets --no-default-features -- -D warnings
- name: test
if: matrix.rust == 'stable'
run: cargo test --all-features
- name: doc
if: matrix.rust == 'stable'
run: cargo doc --no-deps --all-features
env:
RUSTDOCFLAGS: "-D warnings"