From 1cbef56f9ed11a829e2911f6d8414ac3ab328a43 Mon Sep 17 00:00:00 2001 From: "aiyion.prime" Date: Mon, 16 Dec 2024 01:25:24 +0100 Subject: [PATCH] ci: Run prettier in check mode upon PRs and pushes against an on master. --- .github/workflows/prettier.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/prettier.yml diff --git a/.github/workflows/prettier.yml b/.github/workflows/prettier.yml new file mode 100644 index 0000000..0d87610 --- /dev/null +++ b/.github/workflows/prettier.yml @@ -0,0 +1,28 @@ +name: Verify repo is prettier consistent + +on: + push: + branches: + - master + pull_request: + branches: + - master + +jobs: + build_and_verify: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Set up Node.js + uses: actions/setup-node@v3 + with: + node-version: "23" + + - name: Install dependencies + run: npm install + + - name: Run prettier in check mode + run: node_modules/prettier/bin/prettier.cjs . --check