-
Notifications
You must be signed in to change notification settings - Fork 321
48 lines (39 loc) · 1.35 KB
/
test.yml
File metadata and controls
48 lines (39 loc) · 1.35 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
45
46
47
48
name: Test
on:
push:
branches: '*'
pull_request:
branches: [master]
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
permissions:
contents: read
timeout-minutes: 10
strategy:
matrix:
node-version: [22, 20, 18, 16, 14, 12, 10, 8]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Install dependencies
if: ${{ matrix.node-version >= 8 }}
run: npm ci
- name: Install dependencies (node < 8)
if: ${{ matrix.node-version < 8 }}
run: npm install --only=prod
- name: Run unit tests
if: ${{ matrix.node-version >= 16 }}
run: npm test
- name: Run unit tests (node < 16)
if: ${{ matrix.node-version < 16 }}
run: node scripts/legacy-test-runner.js
- name: Run unit tests (compilers)
if: ${{ matrix.node-version >= 16 }}
run: npm install typescript coffee-script --no-save && npm run test:compilers