Skip to content

deps: bump the dev-dependencies group across 1 directory with 10 updates #73

deps: bump the dev-dependencies group across 1 directory with 10 updates

deps: bump the dev-dependencies group across 1 directory with 10 updates #73

Workflow file for this run

name: CI
# Standalone test matrix — runs lint, tests (Node 20.x/22.x/24.x),
# dist-check, and browser tests on every push and pull_request to main.
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: read
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Use Node.js 22.x
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: '22.x'
- run: npm ci
- run: npm run lint-check
# checkJs validation of the JSDoc annotations that generate the
# published type declarations (types/).
- run: npm run typecheck
test:
name: Test (Node ${{ matrix.node-version }})
runs-on: ubuntu-latest
strategy:
matrix:
# Keep in sync with the README "Requirements" section.
node-version: [20.x, 22.x, 24.x]
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
# `coverage` wraps the same mocha run in c8 with check-coverage
# thresholds (100% statements/branches/functions/lines, configured in
# package.json) so any PR that drops coverage fails here, on PRs from
# forks included — Codecov only reports on post-merge pushes.
- run: npm run coverage
dist-check:
name: Verify dist/ and types/ are up to date
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Use Node.js 22.x
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: '22.x'
- run: npm ci
# Wipe both build-output trees first so the post-build `git status` check
# catches three failure modes: (1) modifications to regenerated files,
# (2) tracked files that are no longer generated (orphans), and (3)
# newly-generated files not yet committed.
- name: Clean build outputs
run: rm -rf dist types
- run: npm run build
- name: Check for uncommitted dist/ or types/ changes
run: |
if [ -n "$(git status --porcelain dist/ types/)" ]; then
echo "::error::dist/ or types/ out of date. Run 'npm run build' and commit."
git status --short dist/ types/
git --no-pager diff -- dist/ types/ | head -200
exit 1
fi
browser-tests:
name: Browser Tests (Playwright)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Use Node.js 22.x
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: '22.x'
- run: npm ci
- name: Install Playwright browsers and deps
run: npx playwright install --with-deps chromium
- run: npm run test:browser