-
Notifications
You must be signed in to change notification settings - Fork 85
70 lines (57 loc) · 1.52 KB
/
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
name: Unit Tests
on:
push:
branches:
- master
- ci/*
- release/*
pull_request:
branches:
- master
jobs:
test:
name: On ${{ matrix.os }}
strategy:
matrix:
os: ['windows-latest', 'macos-latest', 'ubuntu-latest']
runs-on: ${{ matrix.os }}
steps:
- name: Checkout the code
uses: actions/checkout@v3
# Needed for Electron tests
- name: Setup Display (Linux)
run: Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
if: runner.os == 'Linux'
- name: Update apt index (Linux)
run: sudo apt update
if: runner.os == 'Linux'
- name: Install system libs (Linux)
run: sudo apt install libcurl4 libudev-dev libusb-1.0-0-dev xvfb
if: runner.os == 'Linux'
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: '18.x'
- name: Enable Corepack
run: corepack enable
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Install dependencies
run: yarn install
- name: Build native
run: yarn build:native
- name: Build
run: yarn build
- name: Test
run: yarn test:coverage
env:
DISPLAY: ':99.0'
- name: Upload coverage
uses: codecov/codecov-action@v3
with:
files: 'packages/**/coverage/clover.xml'
if: runner.os == 'Linux'