name: CI
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
jobs:
test:
name: Rust
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Rust stable
run: rustup toolchain install stable --profile minimal --component clippy --component rustfmt
- name: Check formatting
run: cargo +stable fmt --all --check
- name: Clippy
run: cargo +stable clippy --locked --all-targets --all-features -- -D warnings
- name: Build
run: cargo +stable build --locked --all-targets --all-features
- name: Test default features
run: cargo +stable test --locked
- name: Test Tokio feature
run: cargo +stable test --locked --features tokio
- name: Test loom model
run: cargo +stable test --locked --features loom --test thread_safe_loom