name: Format Check

on:
  push:
    branches:
      - '**'
  pull_request:
    branches:
      - main
      - 'release/**'

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

env:
  CARGO_TERM_COLOR: always

jobs:
  format_check:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v6
      - uses: dtolnay/rust-toolchain@stable

      - name: Install make
        run: sudo apt-get install -y make

      - name: Format check
        run: make fmt
