-
-
Notifications
You must be signed in to change notification settings - Fork 1k
171 lines (148 loc) · 4.08 KB
/
Copy pathci.yml
File metadata and controls
171 lines (148 loc) · 4.08 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
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
name: CI
on:
push:
pull_request:
workflow_dispatch:
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true"
permissions:
contents: write
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test-unix:
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
timeout-minutes: 30
env:
ROBOTJS_ENABLE_PNG: "1"
strategy:
fail-fast: false
matrix:
include:
- name: Linux / Node 24
os: ubuntu-24.04
node-version: "24"
- name: Linux / Node 25
os: ubuntu-24.04
node-version: "25"
- name: macOS / Node 25
os: macos-15-intel
node-version: "25"
steps:
- name: Check out repository
uses: actions/checkout@v6
with:
fetch-depth: 5
- name: Set up Node.js
uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node-version }}
architecture: x64
cache: npm
check-latest: true
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.x"
- name: Install Linux desktop dependencies
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y \
libasound2t64 \
libatk-bridge2.0-0 \
libatk1.0-0 \
libcups2t64 \
libdbus-1-3 \
libdrm2 \
libgbm1 \
libglib2.0-0 \
libgtk-3-0 \
libnspr4 \
libnss3 \
libpango-1.0-0 \
libpng-dev \
libx11-dev \
libx11-xcb1 \
libxcb1 \
libxcomposite1 \
libxdamage1 \
libxext6 \
libxfixes3 \
libxkbcommon0 \
libxrandr2 \
libxshmfence1 \
libxtst-dev \
pkg-config \
openbox \
xauth \
xvfb
- name: Install macOS image dependencies
if: runner.os == 'macOS'
run: brew install libpng pkg-config
- name: Show toolchain versions
run: |
node --version
npm --version
python --version
- name: Install dependencies
run: npm install
- name: Verify PNG support
run: node -e "if (!require('.').image.supportsPNG) throw new Error('PNG support is disabled')"
- name: Run tests on macOS
if: runner.os == 'macOS'
run: npm test
- name: Run tests on Linux desktop session
if: runner.os == 'Linux'
shell: bash
run: |
xvfb-run --auto-servernum --server-args="-screen 0 1920x1080x24 -ac +extension RANDR" \
bash -lc 'openbox >/tmp/openbox.log 2>&1 & npm test'
- name: Print Linux desktop logs on failure
if: failure() && runner.os == 'Linux'
shell: bash
run: |
if [ -f /tmp/openbox.log ]; then
cat /tmp/openbox.log
fi
test-windows:
name: Windows / Node ${{ matrix.node-version }} / ${{ matrix.architecture }}
runs-on: windows-2022
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
include:
- node-version: "24"
architecture: x64
- node-version: "25"
architecture: x64
steps:
- name: Check out repository
uses: actions/checkout@v6
with:
fetch-depth: 5
- name: Set up Node.js
uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node-version }}
architecture: ${{ matrix.architecture }}
cache: npm
check-latest: true
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.x"
- name: Show toolchain versions
shell: pwsh
run: |
node --version
npm --version
python --version
node -p "process.arch"
- name: Install dependencies
run: npm install
- name: Run tests
run: npm test