-
Notifications
You must be signed in to change notification settings - Fork 15
38 lines (34 loc) · 843 Bytes
/
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
name: npm test
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
build:
strategy:
matrix:
node-version:
- 20
os:
- ubuntu-latest
- macos-latest
- windows-latest
runs-on: ${{ matrix.os }}
steps:
- name: Setup xvfb for ubuntu
run: Xvfb :99 -screen 0 1024x768x24 > /dev/null &
if: matrix.os == 'ubuntu-latest'
- uses: actions/checkout@v2
- name: Use node ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm run build --if-present
- run: npm run lint --if-present
if: matrix.os == 'ubuntu-latest'
- run: npm test
env:
CI: true
DISPLAY: :99.0