1+ name : Electron Integration Tests
2+
3+ on :
4+ push :
5+ branches : [ main ]
6+ paths :
7+ - ' products/jbrowse-desktop/**'
8+ - ' packages/app-core/**'
9+ - ' packages/core/**'
10+ - ' .github/workflows/electron-tests.yml'
11+ pull_request :
12+ branches : [ main ]
13+ paths :
14+ - ' products/jbrowse-desktop/**'
15+ - ' packages/app-core/**'
16+ - ' packages/core/**'
17+ - ' .github/workflows/electron-tests.yml'
18+
19+ # Allow one concurrent deployment
20+ concurrency :
21+ group : ${{ github.workflow }}-${{ github.ref }}
22+ cancel-in-progress : true
23+
24+ jobs :
25+ electron-tests :
26+ runs-on : ubuntu-latest
27+
28+ strategy :
29+ matrix :
30+ node-version : [18.x]
31+
32+ steps :
33+ - name : Checkout repository
34+ uses : actions/checkout@v4
35+ with :
36+ fetch-depth : 0
37+
38+ - name : Use Node.js ${{ matrix.node-version }}
39+ uses : actions/setup-node@v4
40+ with :
41+ node-version : ${{ matrix.node-version }}
42+ cache : ' yarn'
43+
44+ - name : Install system dependencies
45+ run : |
46+ sudo apt-get update
47+ sudo apt-get install -y \
48+ xvfb \
49+ libnss3-dev \
50+ libatk-bridge2.0-dev \
51+ libdrm2 \
52+ libxkbcommon-dev \
53+ libxss1 \
54+ libasound2-dev \
55+ libgtk-3-dev \
56+ libgbm-dev \
57+ libxrandr2 \
58+ libasound2 \
59+ libpangocairo-1.0-0 \
60+ libatk1.0-0 \
61+ libcairo-gobject2 \
62+ libgtk-3-0 \
63+ libgdk-pixbuf2.0-0
64+
65+ - name : Install dependencies
66+ run : yarn install --frozen-lockfile
67+
68+ - name : Build core packages
69+ run : yarn build
70+
71+ - name : Build desktop app
72+ run : |
73+ cd products/jbrowse-desktop
74+ yarn build
75+
76+ - name : Install desktop dependencies
77+ run : |
78+ cd products/jbrowse-desktop
79+ yarn install --frozen-lockfile
80+
81+ - name : Run integration tests
82+ run : |
83+ cd products/jbrowse-desktop
84+ yarn test:integration:ci
85+ env :
86+ CI : true
87+ NODE_ENV : test
88+ ELECTRON_ENABLE_LOGGING : false
89+ ELECTRON_DISABLE_SECURITY_WARNINGS : true
90+
91+ - name : Upload test results
92+ if : always()
93+ uses : actions/upload-artifact@v4
94+ with :
95+ name : electron-test-results
96+ path : |
97+ products/jbrowse-desktop/wdio-logs/
98+ products/jbrowse-desktop/test-results/
99+ retention-days : 30
100+
101+ - name : Upload screenshots on failure
102+ if : failure()
103+ uses : actions/upload-artifact@v4
104+ with :
105+ name : electron-test-screenshots
106+ path : |
107+ products/jbrowse-desktop/screenshots/
108+ products/jbrowse-desktop/wdio-logs/
109+ retention-days : 7
110+
111+ electron-tests-windows :
112+ runs-on : windows-latest
113+
114+ steps :
115+ - name : Checkout repository
116+ uses : actions/checkout@v4
117+ with :
118+ fetch-depth : 0
119+
120+ - name : Use Node.js 18.x
121+ uses : actions/setup-node@v4
122+ with :
123+ node-version : 18.x
124+ cache : ' yarn'
125+
126+ - name : Install dependencies
127+ run : yarn install --frozen-lockfile
128+
129+ - name : Build core packages
130+ run : yarn build
131+
132+ - name : Build desktop app
133+ run : |
134+ cd products/jbrowse-desktop
135+ yarn build
136+
137+ - name : Install desktop dependencies
138+ run : |
139+ cd products/jbrowse-desktop
140+ yarn install --frozen-lockfile
141+
142+ - name : Run integration tests
143+ run : |
144+ cd products/jbrowse-desktop
145+ yarn test:integration
146+ env :
147+ CI : true
148+ NODE_ENV : test
149+ ELECTRON_ENABLE_LOGGING : false
150+ ELECTRON_DISABLE_SECURITY_WARNINGS : true
151+
152+ - name : Upload test results
153+ if : always()
154+ uses : actions/upload-artifact@v4
155+ with :
156+ name : electron-test-results-windows
157+ path : |
158+ products/jbrowse-desktop/wdio-logs/
159+ products/jbrowse-desktop/test-results/
160+ products/jbrowse-desktop/screenshots/
161+ retention-days : 30
162+
163+ electron-tests-macos :
164+ runs-on : macos-latest
165+
166+ steps :
167+ - name : Checkout repository
168+ uses : actions/checkout@v4
169+ with :
170+ fetch-depth : 0
171+
172+ - name : Use Node.js 18.x
173+ uses : actions/setup-node@v4
174+ with :
175+ node-version : 18.x
176+ cache : ' yarn'
177+
178+ - name : Install dependencies
179+ run : yarn install --frozen-lockfile
180+
181+ - name : Build core packages
182+ run : yarn build
183+
184+ - name : Build desktop app
185+ run : |
186+ cd products/jbrowse-desktop
187+ yarn build
188+
189+ - name : Install desktop dependencies
190+ run : |
191+ cd products/jbrowse-desktop
192+ yarn install --frozen-lockfile
193+
194+ - name : Run integration tests
195+ run : |
196+ cd products/jbrowse-desktop
197+ yarn test:integration
198+ env :
199+ CI : true
200+ NODE_ENV : test
201+ ELECTRON_ENABLE_LOGGING : false
202+ ELECTRON_DISABLE_SECURITY_WARNINGS : true
203+
204+ - name : Upload test results
205+ if : always()
206+ uses : actions/upload-artifact@v4
207+ with :
208+ name : electron-test-results-macos
209+ path : |
210+ products/jbrowse-desktop/wdio-logs/
211+ products/jbrowse-desktop/test-results/
212+ products/jbrowse-desktop/screenshots/
213+ retention-days : 30
0 commit comments