name: CI
on: [push, pull_request]
jobs:
ci:
name: ${{ matrix.rust }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
rust: [stable, nightly, beta]
steps:
- name: checkout code
uses: actions/checkout@v2
- name: rust toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
components: rustfmt
- name: cargo build
uses: actions-rs/cargo@v1
with:
command: build
- name: cargo test
uses: actions-rs/cargo@v1
with:
command: test
- name: cargo fmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: -- --check