-
Notifications
You must be signed in to change notification settings - Fork 92
71 lines (58 loc) · 2.21 KB
/
positron-ci.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
name: "Positron: CI"
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
linux:
name: Tests on Linux
runs-on: ubuntu-latest
timeout-minutes: 45
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
POSITRON_BUILD_NUMBER: 0 # CI skips building releases
steps:
- uses: actions/checkout@v4
- name: Setup Build Environment
run: |
sudo apt-get update
sudo apt-get install -y vim curl build-essential clang make cmake git python3-pip python-is-python3 libsodium-dev libxkbfile-dev pkg-config libsecret-1-dev libxss1 dbus xvfb libgtk-3-0 libgbm1 libnss3 libnspr4 libasound2 libkrb5-dev
sudo cp build/azure-pipelines/linux/xvfb.init /etc/init.d/xvfb
sudo chmod +x /etc/init.d/xvfb
sudo update-rc.d xvfb defaults
sudo service xvfb start
- uses: actions/setup-node@v3
with:
node-version: 18
- name: Execute yarn
env:
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
ELECTRON_SKIP_BINARY_DOWNLOAD: 1
POSITRON_GITHUB_PAT: ${{ secrets.POSITRON_GITHUB_PAT }}
run: |
# Install Yarn
npm install -g yarn
# Install node-gyp; this is required by some packages, and yarn
# sometimes fails to automatically install it.
yarn global add node-gyp
# Perform the main yarn command; this installs all Node packages and
# dependencies
yarn --immutable --network-timeout 120000
- name: Compile and Download
run: yarn npm-run-all --max_old_space_size=4095 -lp compile "electron x64" playwright-install download-builtin-extensions
- name: Compile Integration Tests
run: yarn --cwd test/integration/browser compile
- name: Compile Smoke Tests
run: yarn --cwd test/smoke compile
- name: Run Unit Tests (node.js)
id: nodejs-unit-tests
run: yarn test-node
- name: Run Integration Tests (Electron)
id: electron-integration-tests
run: DISPLAY=:10 ./scripts/test-integration.sh
- name: Run Smoke Tests (Electron)
id: electron-smoke-tests
run: DISPLAY=:10 yarn smoketest-no-compile --tracing