summaryrefslogtreecommitdiff
path: root/.github/workflows/rust.yml
blob: ef6e38a7341388459fe3f8eaf1cbb7b07c8f9be3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
---
name: Rust

on:
  push:
    branches: [main]
  pull_request:
    branches: [main]

permissions:
  contents: read

env:
  CARGO_TERM_COLOR: always
  ACTIONS_LINTS_TOOLCHAIN: 1.53.0

jobs:
  linting:
    name: "Lints, pinned toolchain"
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repository
        uses: actions/checkout@v2
      - name: Install toolchain
        uses: actions-rs/toolchain@v1
        with:
          toolchain: ${{ env['ACTIONS_LINTS_TOOLCHAIN']  }}
          default: true
          components: rustfmt, clippy
      - name: cargo fmt (check)
        run: cargo fmt -- --check -l