on: push: branches: [master] pull_request: name: Build, Test jobs: build-test: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - uses: actions-rs/toolchain@v1 with: toolchain: stable profile: minimal components: rustfmt, clippy - name: Build uses: actions-rs/cargo@v1 with: command: build - name: Run tests uses: actions-rs/cargo@v1 with: command: test - name: Check formatting uses: actions-rs/cargo@v1 with: command: fmt args: -- --check - name: Catch common mistakes uses: actions-rs/cargo@v1 with: command: clippy args: --all-targets -- -D warnings