-
-
Notifications
You must be signed in to change notification settings - Fork 630
50 lines (41 loc) · 1.35 KB
/
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
42
43
44
45
46
47
48
49
50
name: Build + Test
on: [push, pull_request]
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, ubuntu-latest]
node-version: [16.x]
name: ${{ matrix.os }} (Node.js ${{ matrix.node-version }})
steps:
- name: Checkout 🛎
uses: actions/checkout@v4
- name: Setup Node.js ${{ matrix.node-version }} ⚙
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Run display server 🖥
run: /usr/bin/Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 & echo "Started xvfb"
shell: bash
if: ${{ success() && matrix.os == 'ubuntu-latest' }}
- name: Install node_modules 📦
run: npm ci
- name: Cache node_modules 💾
uses: actions/cache@v3
env:
cache-name: cache-node-modules
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Test + Build 🚀
run: |
npm test
npm run vscode:prepublish
env:
DISPLAY: ':99.0'