name: javascript-test-runner / format

on:
  push:
  pull_request:
  workflow_dispatch:

jobs:
  verify:
    runs-on: ubuntu-22.04
    steps:
      - name: 'Checkout code'
        uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683

      - name: Use Node.js LTS (20.x)
        uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af
        with:
          node-version: 20.x

      - name: Enable pnpm
        run: |
          corepack enable pnpm
          corepack pnpm -v

      - name: 'Verify formatting of all files'
        run: ./bin/check-formatting.sh