-
Notifications
You must be signed in to change notification settings - Fork 12
40 lines (37 loc) · 989 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
# This workflow will do a clean install of node dependencies, build the source code and run tests across different platforms
name: build
on:
push:
branches-ignore:
- 'releases/**/*'
paths:
- 'src/**/*'
- 'README.md'
- '.github/workflows/build.yml'
- 'webpack.config.js'
jobs:
build:
strategy:
fail-fast: false
matrix:
node-version: [ 16 ]
os: [ ubuntu-latest, windows-latest ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: npm ci
- name: Lint code
run: npm run lint
- name: Lint tests
run: npm run linttests
- name: Build, test (Linux-only)
run: xvfb-run -a npm test
if: runner.os == 'Linux'
- name: Build, test
run: npm test
if: runner.os != 'Linux'