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