name: Rust
on:
push:
branches:
pull_request:
branches:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
components: rustfmt
- name: Check
uses: actions-rs/cargo@v1
with:
command: check
- name: Test
uses: actions-rs/cargo@v1
with:
command: test
- name: Format
run: cargo fmt -- --check