From 6f9daff74a6cd0e6cfa6d34eb4c7303d59ab36c2 Mon Sep 17 00:00:00 2001 From: isaak Date: Sun, 26 May 2024 16:54:09 -0700 Subject: [PATCH] add format workflow --- .github/workflows/format.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/format.yml 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 +