diff --git a/.github/workflows/merge.yml b/.github/workflows/merge.yml index 01d8c8fa5..b988f46b3 100644 --- a/.github/workflows/merge.yml +++ b/.github/workflows/merge.yml @@ -23,9 +23,31 @@ concurrency: permissions: {} jobs: + lint: + name: Lint + runs-on: ubuntu-24.04 + strategy: + matrix: + component: [backend, frontend] + timeout-minutes: 5 + steps: + - uses: actions/checkout@v5 + - uses: actions/setup-node@v6 + with: + node-version: 22 + cache: npm + cache-dependency-path: ${{ matrix.component }}/package-lock.json + - name: Install dependencies + working-directory: ${{ matrix.component }} + run: npm ci + - name: Run linting + working-directory: ${{ matrix.component }} + run: npm run lint + # https://github.com/bcgov/quickstart-openshift-helpers deploy-test: name: Deploy (TEST) + needs: [lint] uses: ./.github/workflows/.deployer.yml secrets: inherit with: diff --git a/.github/workflows/pr-open.yml b/.github/workflows/pr-open.yml index 238d9f14c..a4fddfc13 100644 --- a/.github/workflows/pr-open.yml +++ b/.github/workflows/pr-open.yml @@ -11,9 +11,31 @@ concurrency: permissions: {} jobs: + lint: + name: Lint + runs-on: ubuntu-24.04 + strategy: + matrix: + component: [backend, frontend] + timeout-minutes: 5 + steps: + - uses: actions/checkout@v5 + - uses: actions/setup-node@v6 + with: + node-version: 22 + cache: npm + cache-dependency-path: ${{ matrix.component }}/package-lock.json + - name: Install dependencies + working-directory: ${{ matrix.component }} + run: npm ci + - name: Run linting + working-directory: ${{ matrix.component }} + run: npm run lint + # https://github.com/bcgov/action-builder-ghcr builds: name: Builds + needs: [lint] permissions: packages: write runs-on: ubuntu-24.04 @@ -51,7 +73,7 @@ jobs: results: name: PR Results - needs: [builds, deploys, tests] + needs: [lint, builds, deploys, tests] if: always() runs-on: ubuntu-24.04 steps: