name: CI checks
on:
pull_request:
types: [ synchronize, opened, reopened, ready_for_review ]
branches-ignore:
- master
push:
branches:
- master
jobs:
test-nightly:
name: "Test Nightly"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly-2024-04-10
components: clippy, miri, rustfmt
- name: Rust cache
uses: Swatinem/rust-cache@v2
- name: Check formatting
run: cargo fmt --all -- --check
- name: Clippy
run: cargo clippy --all-features -- -D warnings
- name: Unit tests
run: cargo test --all-features
- name: Test with Miri
run: cargo miri test --all-features
test-stable:
name: "Test Stable"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
components: clippy, rustfmt
- name: Rust cache
uses: Swatinem/rust-cache@v2
- name: Check formatting
run: cargo fmt --all -- --check
- name: Clippy
run: cargo clippy -- -D warnings
- name: Unit tests
run: cargo test