From 07d8a554c9b0d198e08c013f74b5aaf10fb1ec0b Mon Sep 17 00:00:00 2001 From: Tamir <1tamir198@gmail.com> Date: Mon, 18 Mar 2024 23:58:53 +0200 Subject: [PATCH] test format on pr --- .github/workflows/pr-checks.yml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pr-checks.yml b/.github/workflows/pr-checks.yml index bb73d78c..1e610092 100644 --- a/.github/workflows/pr-checks.yml +++ b/.github/workflows/pr-checks.yml @@ -1,6 +1,9 @@ name: Pull Request Mandatory Checks -run-name: Pull Request Checks -on: [pull_request] +on: + pull_request: + branches: + - main + jobs: Check-Formatting: runs-on: ubuntu-latest @@ -10,10 +13,14 @@ jobs: uses: actions/setup-node@v3 with: node-version: 18.x - - run: npx prettier --write . --config ./.prettierrc + - run: npm install + - run: npm run format + - name: Check formatting changes + run: git diff --exit-code Check-Lint: runs-on: ubuntu-latest + needs: [Check-Formatting] steps: - uses: actions/checkout@v3 - name: Check Lint Using Node 18.x (LTS) @@ -25,6 +32,7 @@ jobs: Check-Build: runs-on: ubuntu-latest + needs: [Check-Formatting] steps: - uses: actions/checkout@v3 - name: Check Build Using Node 18.x LTS