From 6b545a3ad7d113bbb84a143df3206b5ec2a3aee8 Mon Sep 17 00:00:00 2001 From: Peter Zhu Date: Wed, 25 Sep 2024 18:14:58 -0400 Subject: [PATCH] Add format dryrun Signed-off-by: Peter Zhu --- .github/workflows/build.yml | 8 +++++--- package.json | 1 + 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e878c3d..95c7f94 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -18,6 +18,8 @@ jobs: with: node-version: ${{ matrix.node-version }} - name: Install dependencies and build the code - run: | - npm install - npm run build + run: npm install + - name: Verify styling + run: npm run format-dryrun + - name: Run build + run: npm run build diff --git a/package.json b/package.json index 6b7347d..d47bc3c 100644 --- a/package.json +++ b/package.json @@ -18,6 +18,7 @@ "start": "npm run build && probot run ./bin/app.js", "clean": "rm -rf ./bin/*", "format": "prettier --write \"src/**/*.{js,ts}\" \"test/**/*.ts\" \"configs/**/*.{yaml,yml}\"", + "format-dryrun": "prettier --check \"src/**/*.{js,ts}\" \"test/**/*.ts\" \"configs/**/*.{yaml,yml}\"", "lint": "eslint --fix \"src/**/*.ts\" --ignore-pattern \"**/*.d.ts\"", "test": "jest" },