summaryrefslogtreecommitdiffhomepage
path: root/.github/workflows/testframework-rustfmt.yml
blob: 78045fc7442d701aac5e158316ad4175627a7dbc (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
32
# Run `cargo fmt --check` on the `test` workspace
---
name: DES Testframework - Check formatting
on:
  pull_request:
    paths:
      - 'test/**/*.rs'
      - .github/workflows/rustfmt-test.yml
      - rustfmt.toml
  workflow_dispatch:

permissions: {}

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

      - name: Install Rust
        uses: actions-rs/toolchain@v1.0.6
        with:
          toolchain: stable
          components: rustfmt
          default: true

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