-
Notifications
You must be signed in to change notification settings - Fork 41
49 lines (39 loc) · 1.03 KB
/
build-and-test.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
name: Run Tests
on:
push:
pull_request:
branches: [master]
jobs:
build:
name: "(${{ matrix.os }})"
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
node-version: [20.x]
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup Node v${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Setup XVFB
if: matrix.os == 'ubuntu-latest'
run: Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
- name: Setup ubuntu
if: matrix.os == 'ubuntu-latest'
run: sudo apt-get install -y xclip
- name: npm install
run: npm install
- name: npm lint
run: npm run lint
- name: npm test
run: npm test
env:
CI: true
ELECTRON_NO_ATTACH_CONSOLE: 1
DISPLAY: ":99.0"