Repository navigation
44 lines (40 loc) · 1.55 KB
/
Copy pathtests.yml
File metadata and controls
44 lines (40 loc) · 1.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: Tests
# On demand only, never on every commit: run it by hand (Actions → Tests → Run workflow,
# or `gh workflow run tests.yml --ref <branch>`), or add the `run-tests` label to a pull
# request. The label is removed as soon as it is added, by tests-unlabel.yml, so adding it
# again runs the suite again.
on:
workflow_dispatch:
pull_request:
types: [labeled]
permissions:
contents: read
concurrency:
group: tests-${{ github.ref }}
cancel-in-progress: true
jobs:
tests:
if: github.event_name == 'workflow_dispatch' || github.event.label.name == 'run-tests'
runs-on: ubuntu-latest
# The whole suite takes a few minutes; a hung run must not sit until GitHub's 6-hour limit.
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
# node --test expands a quoted glob itself only from Node 21 on; jsdom 30.1.1 (the DOM
# tests' one dev dependency) needs ^22.22.2 || ^24.15.0 || >=26, which is engines.node in
# package.json. A major here resolves to its latest release, inside that range.
node: [22, 24]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
cache: npm
# Before installing anything: the level-1 suite must keep running with no install.
- name: Level-1 suite, no dependencies
run: node --test --test-timeout=120000 "tests/**/*.test.mjs"
- name: Install the development tooling
run: npm ci
- name: Whole suite (level 1 and DOM tests)
run: npm test