summaryrefslogtreecommitdiff
path: root/.github/workflows/fmt.yml
blob: 40b17386b02df76bb97ed13e02548ec2440ae0f7 (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
name: fmt

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

env:
  CARGO_TERM_COLOR: always

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v4
    - name: "Install Rust"
      uses: dtolnay/rust-toolchain@nightly
      with:
        components: rustfmt
    - name: Check formatting
      run: |
        source $HOME/.cargo/env
        cargo +nightly fmt --all -- --check