name: formatting

on:
  push:
    branches: [ main ]
    paths:
      - '**.rs'
  pull_request:
    branches: [ main ]
    paths-ignore:
      - '**.rs'

env:
  CARGO_TERM_COLOR: always

jobs:
  cargo-fmt-check:
    runs-on: self-hosted
    steps:
    - uses: actions/checkout@v4

    - name: Run format check
      run: cargo fmt --check