-
Notifications
You must be signed in to change notification settings - Fork 252
73 lines (69 loc) · 2.34 KB
/
test-electron.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: '@bugsnag/electron'
on: push
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
electron: [ '^20.0.0', '^24.0.0', '^26.0.0', '^28.0.0', '^30.0.0' ]
node-version: [18]
os: [ ubuntu-latest ]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: (Act) install build tools and dependencies
run: |
sudo apt-get --assume-yes update
sudo apt-get --assume-yes install build-essential xvfb libnss3 libatk1.0-0 libatk-bridge2.0-0 libgdk-pixbuf2.0-0 libgtk-3-0 libasound2 libgbm1
# electron-forge requires yarn for some reason
npm install --global yarn
if: ${{ env.ACT && contains(matrix.os, 'ubuntu-20.04') }}
- name: Get npm cache directory
id: npm-cache-dir
if: ${{ !env.ACT }}
run: |
echo "::set-output name=dir::$(npm config get cache)"
- uses: actions/cache@v4
id: npm-cache
if: ${{ !env.ACT }}
with:
path: ${{ steps.npm-cache-dir.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- run: npm install electron@${{ matrix.electron }} --no-audit --progress=false --no-save
env:
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
- run: npm ci --no-audit --progress=false
env:
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
- run: npx lerna bootstrap
- run: npm run build:electron
shell: bash
- run: sudo apt-get install cppcheck --assume-yes
name: Install cppcheck
if: contains(matrix.os, 'ubuntu')
- run: npm run test:lint-native
name: Lint C/C++ extensions
if: contains(matrix.os, 'ubuntu')
- name: (macOS) disable crash dialog
if: contains(matrix.os, 'macos')
run: defaults write com.apple.CrashReporter DialogType none
- name: run unit tests
run: npm run test:unit:electron-runner
env:
ELECTRON_DISABLE_SANDBOX: 1
- name: run integration tests
run: npm run test:electron
shell: bash
env:
START_LOCAL_NPM: 1
VERBOSE: 1
ELECTRON_VERSION: ${{ matrix.electron }}
- uses: actions/upload-artifact@v4
if: failure()
with:
name: cucumber-failures
path: test/.cucumber-failures/