on:
push:
branches:
- main
pull_request:
branches:
- main
name: CI
jobs:
test-linux:
name: test
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-latest
rust:
- stable
- beta
- nightly
include:
- os: macos-latest
rust: stable
- os: windows-latest
rust: stable
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
- uses: actions-rs/cargo@v1
with:
command: test
- uses: actions-rs/cargo@v1
with:
command: doc
clippy:
name: clippy + fmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true
components: rustfmt, clippy
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
- uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -D warnings