From f8d20858a39f4251c3ef477ee1e494eca0ae516c Mon Sep 17 00:00:00 2001 From: madhusudhand Date: Thu, 2 Mar 2023 13:06:22 +0530 Subject: [PATCH] Add lint validation to PR workflows --- .github/workflows/pr-checks.yml | 35 +++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/pr-checks.yml diff --git a/.github/workflows/pr-checks.yml b/.github/workflows/pr-checks.yml new file mode 100644 index 00000000..be71a4e6 --- /dev/null +++ b/.github/workflows/pr-checks.yml @@ -0,0 +1,35 @@ +name: Run checks +on: + pull_request: + push: + branches: + - trunk +jobs: + Lint: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Setup Node + uses: actions/setup-node@v3 + with: + node-version-file: '.nvmrc' + cache: npm + + - name: Setup Composer + uses: php-actions/composer@v6 + + - name: Install Dependencies + run: npm i + + - name: Run PHP Lint + run: npm run lint:php + + - name: Run JS Lint + if: success() || failure() + run: npm run lint:js + + - name: Run CSS Lint + if: success() || failure() + run: npm run lint:css