forked from jsdom/jsdom
-
Notifications
You must be signed in to change notification settings - Fork 0
78 lines (75 loc) · 2.08 KB
/
jsdom-ci.yml
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: read
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install dependencies
run: npm ci
- name: Run syntax rules check with ESLint
run: npm run lint
build-with-canvas:
name: Tests with node-canvas
env:
TEST_SUITE: 'node-canvas'
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- node-version: '20'
canvas-version: '^2.11.2'
- node-version: '22'
canvas-version: '^3.0.0-rc3'
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Install required image manipulation packages with APT
run: sudo apt-get install build-essential libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev
- name: Setup HOSTS file for Web Platform Test server
run: ./test/web-platform-tests/tests/wpt make-hosts-file | sudo tee -a /etc/hosts
- name: Install dependencies
run: npm ci && npm install canvas@${{ matrix.canvas-version }}
- name: Run tests
run: npm test -- --retries 1
build:
name: Tests
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version:
- 18
- 20
- 22
- latest
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Setup HOSTS file for Web Platform Test server
run: ./test/web-platform-tests/tests/wpt make-hosts-file | sudo tee -a /etc/hosts
- name: Install dependencies
run: npm ci
- name: Run tests
run: npm run test -- --retries 1