| 1 | name: Lint |
| 2 | |
| 3 | on: |
| 4 | push: |
| 5 | branches: |
| 6 | - main |
| 7 | pull_request: |
| 8 | |
| 9 | jobs: |
| 10 | clippy: |
| 11 | runs-on: ubuntu-latest |
| 12 | steps: |
| 13 | - uses: actions/checkout@v2 |
| 14 | |
| 15 | - uses: actions-rs/toolchain@v1 |
| 16 | with: |
| 17 | toolchain: stable |
| 18 | profile: minimal |
| 19 | components: clippy |
| 20 | - uses: actions-rs/clippy-check@v1 |
| 21 | with: |
| 22 | token: ${{ secrets.GITHUB_TOKEN }} |
| 23 | args: --all-features -- -W clippy::all |
| 24 | |
| 25 | rustfmt: |
| 26 | runs-on: ubuntu-latest |
| 27 | steps: |
| 28 | - uses: actions/checkout@v2 |
| 29 | |
| 30 | - uses: actions-rs/toolchain@v1 |
| 31 | with: |
| 32 | toolchain: stable |
| 33 | profile: minimal |
| 34 | components: rustfmt |
| 35 | - uses: actions-rs/cargo@v1 |
| 36 | with: |
| 37 | command: fmt |
| 38 | args: --all -- --check |