name: Format
on: [push, pull_request]
jobs:
  all:
    runs-on: ubuntu-latest
    steps:
      - uses: hecrj/setup-rust-action@v2
        with:
          rust-version: stable
          components: rustfmt
      - uses: actions/checkout@master
      - name: Check format
        run: cargo fmt --all -- --check
