name: ci
on: [push, pull_request]
jobs:
build:
name: Build - ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install stable
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Install components
run: rustup component add --toolchain stable rustfmt clippy
- name: Fetch
uses: actions-rs/cargo@v1
with:
command: fetch
- name: Check
uses: actions-rs/cargo@v1
with:
command: check
args: --examples
- name: Format
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
- name: Clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -D warnings