summaryrefslogtreecommitdiffhomepage
path: root/.github/workflows/rustfmt.yml
blob: efcbfb78384202f486aae48c2050b8bd80244695 (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
---
name: Rust - Check formatting
on:
  pull_request:
    paths:
      - .github/workflows/rustfmt.yml
      - rustfmt.toml
      - '**/*.rs'
  workflow_dispatch:

permissions: {}

jobs:
  check-formatting:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repository
        uses: actions/checkout@v4

      - uses: ./.github/actions/mullvad-build-env
        with:
          rustup-components: rustfmt

      - name: Check formatting
        run: |-
          rustfmt --version
          cargo fmt -- --check