From 80b6fa0c1b667d5875c41d4abd3357ab7f5e7e3f Mon Sep 17 00:00:00 2001 From: Yannick Brosseau Date: Tue, 17 Dec 2024 10:08:12 -0500 Subject: [PATCH] Add a format check to github workflow --- .github/workflows/transition.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/.github/workflows/transition.yml b/.github/workflows/transition.yml index 0c59b9bf..80534d2b 100644 --- a/.github/workflows/transition.yml +++ b/.github/workflows/transition.yml @@ -51,6 +51,27 @@ jobs: - name: Lint run: yarn lint + check-format: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Use latest Node.js + uses: actions/setup-node@v4 + with: + node-version: 22.x + - name: Install + run: yarn install --frozen-lockfile + - name: Yarn format + run: yarn format + - name: Check git status + run: | + if [[ -n "$(git status --porcelain)" ]]; then + echo "Code formatting issues found. Please run 'yarn format' locally and commit changes." + git status + git diff + exit 1 + fi + cargo-test: name: Json2capnp runs-on: ubuntu-latest