Skip to content

Fixes for workflow triggers #579

Fixes for workflow triggers

Fixes for workflow triggers #579

Workflow file for this run

name: JS Quality Tests
on:
pull_request:
workflow_run:
workflows: ["Update WP Deps"]
types:
- completed
permissions:
issues: write
pull-requests: write
contents: write
checks: write
statuses: write
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 }}
job-name: Test JS (node ${{ matrix.node-version }})
- 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' && always()
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 }}
job-name: Test JS (node ${{ matrix.node-version }})