-
Notifications
You must be signed in to change notification settings - Fork 32
41 lines (32 loc) · 969 Bytes
/
build.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
name: Build
on: [push, pull_request]
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
# Windows throws false positives with linting because of CRLF
- name: Set git to use LF
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 18.x
- name: Install dependencies
run: npm install
- name: Lint
run: npm run lint
- name: Run tests (ubuntu)
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
export DISPLAY=:99
xvfb-run -n 99 -s '-screen 0 1024x768x24' npm run test
pkill Xvfb
- name: Run tests (macos, windows)
if: ${{ !(matrix.os == 'ubuntu-latest') }}
run: npm run test