name: Build and Test
on:
pull_request:
push:
branches:
- master
env:
RUSTFLAGS: -Dwarnings
jobs:
test:
strategy:
matrix:
rust:
os:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
profile: minimal
override: true
components: rustfmt
- name: tests
run: cargo test --all
- name: fmt
if: matrix.rust == 'stable'
run: cargo fmt --all -- --check