name: Test
on:
push:
branches: ["main"]
pull_request:
types: [opened, synchronize, reopened]
env:
CARGO_INCREMENTAL: 0
RUSTFLAGS: "-Dwarnings"
jobs:
test:
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
profile: minimal
- name: Check formatting
run: cargo fmt --all -- --check
- name: Clippy
run: cargo clippy --tests
- name: Unit tests
run: |
cargo install --force cargo-all-features
cargo test-all-features