Skip to content

JS Quality Tests

JS Quality Tests #564

Workflow file for this run

name: JS Quality Tests
on:
pull_request:
paths:
- 'packages/**/*.ts'
- 'packages/**/*.tsx'
- 'packages/**/*.js'
- 'packages/**/*.jsx'
- 'packages/**/*.scss'
- 'package.json'
- 'package-lock.json'
workflow_run:
workflows: ["Update WP Deps"]
types:
- completed
env:
fail-fast: true
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
node-version: [22]
name: Test JS (node ${{ matrix.node-version }})
steps:
- name: Checkout
uses: actions/checkout@v4
if: github.event_name != 'workflow_run'
- name: Checkout
uses: boxuk/checkout-pr@main
id: checkout-deps
if: github.event_name == 'workflow_run'
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: npm
- name: Setup dependencies
run: npm ci
- name: Lint JS
run: npm run lint
- name: Unit Test
run: npm run test
- name: Type Coverage
run: npm run type-coverage
- name: Build
run: npm run build
- name: Mark Check Outcome
if: github.event_name == 'workflow_run'
uses: boxuk/mark-check-status@main
with:
status: ${{ job.status }}
pr-head-sha: ${{ steps.checkout-deps.outputs.pr-head-sha }}
github-token: ${{ secrets.GITHUB_TOKEN }}