on:
push:
paths:
- '**.rs'
- '**.toml'
- '**.yml'
pull_request:
paths:
- '**.rs'
- '**.toml'
- '**.yml'
name: Continuous integration
jobs:
ci:
runs-on: ${{ matrix.os }}
strategy:
matrix:
rust:
- stable
- beta
os:
- ubuntu-latest
- macOS-latest
- windows-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v2
- uses: actions-rs/cargo@v1
name: Build
with:
command: build
- uses: actions-rs/cargo@v1
name: Unit Test
with:
command: test
- uses: actions-rs/cargo@v1
name: Format Check
with:
command: fmt
args: --all -- --check
- uses: actions-rs/cargo@v1
name: Clippy
with:
command: clippy
args: -- -D warnings