diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml new file mode 100644 index 0000000..2c97636 --- /dev/null +++ b/.github/workflows/format.yml @@ -0,0 +1,31 @@ +name: 'Format Check' + +on: + + workflow_dispatch: + + push: + branches: + - main + + pull_request: + +permissions: + contents: read + pull-requests: read + +concurrency: + group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}' + cancel-in-progress: true + +jobs: + check-format: + runs-on: ubuntu-latest + steps: + - name: Checkout & Setup Toolchain + uses: actions/checkout@v4 + uses: actions-rust-lang/setup-rust-toolchain@v1 + + - name: Run Formatter + run: cargo fmt --check +