-
Notifications
You must be signed in to change notification settings - Fork 19
81 lines (64 loc) · 1.93 KB
/
build-test.yaml
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
# Build and test script to run on PR and main build
name: Build and Test
permissions:
deployments: write
on:
pull_request:
branches:
- main
workflow_dispatch:
env:
NODE_VERSION: 18.15.0
NPM_VERSION: 9.5.0
IS_CI: 1
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Use Node ${{env.NODE_VERSION}}
uses: actions/[email protected]
with:
node-version: ${{env.NODE_VERSION}}
- run: npm i -g npm@${{env.NPM_VERSION}}
name: npm install [email protected]
- run: npm install
name: npm install
- run: npm run compile
name: npm run compile
- run: npm run compile-web
name: npm run compile-web
- run: npm run compile-webviews
name: npm run compile-webviews
test:
timeout-minutes: 30
name: Tests
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Use Node ${{env.NODE_VERSION}}
uses: actions/[email protected]
with:
node-version: ${{env.NODE_VERSION}}
- run: npm i -g npm@${{env.NPM_VERSION}}
name: npm install [email protected]
- run: npm install
name: npm install
- run: npm run compile
name: npm run compile
- run: npm run compile-tests
name: npm run compile-tests
- name: Run tests using xvfb
env:
DISPLAY: 10
uses: GabrielBB/[email protected]
id: test_id
with:
run: npm run test