File tree Expand file tree Collapse file tree 4 files changed +48
-3
lines changed
Expand file tree Collapse file tree 4 files changed +48
-3
lines changed Original file line number Diff line number Diff line change 44 push :
55 branches :
66 - ' *'
7+ - ' !winelectron'
78 tags :
89 - ' *'
910
Original file line number Diff line number Diff line change 1+ name : Windows Electron Tests
2+
3+ on :
4+ push :
5+ branches :
6+ - winelectron
7+
8+ permissions :
9+ contents : read
10+
11+ jobs :
12+ windows-electron-e2e :
13+ name : Windows Electron E2E Tests
14+ runs-on : windows-latest
15+ steps :
16+ - uses : actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
17+ with :
18+ persist-credentials : false
19+ - uses : pnpm/action-setup@v4
20+ with :
21+ version : 10
22+ - uses : actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
23+ with :
24+ node-version : ' 22'
25+ cache : ' pnpm'
26+
27+ - name : Install deps
28+ run : pnpm install --frozen-lockfile
29+
30+ - name : Build and test Electron on Windows
31+ run : pnpm test:e2e:ci:win
32+ working-directory : products/jbrowse-desktop
Original file line number Diff line number Diff line change 4040 "test:e2e" : " node --experimental-strip-types test/e2e.ts" ,
4141 "test:e2e:headless" : " xvfb-run --auto-servernum node --experimental-strip-types test/e2e.ts --headless" ,
4242 "test:e2e:build" : " pnpm build-electron-unpacked:linux && pnpm test:e2e" ,
43- "test:e2e:ci" : " pnpm build-electron-unpacked:linux && pnpm test:e2e:headless"
43+ "test:e2e:ci" : " pnpm build-electron-unpacked:linux && pnpm test:e2e:headless" ,
44+ "test:e2e:build:win" : " pnpm build-electron-unpacked:win && pnpm test:e2e" ,
45+ "test:e2e:ci:win" : " pnpm build-electron-unpacked:win && node --experimental-strip-types test/e2e.ts --headless"
4446 },
4547 "dependencies" : {
4648 "@emotion/react" : " ^11.14.0" ,
Original file line number Diff line number Diff line change @@ -8,7 +8,13 @@ const require = createRequire(import.meta.url)
88
99const __dirname = dirname ( fileURLToPath ( import . meta. url ) )
1010const TEST_DATA_DIR = resolve ( __dirname , '../../../test_data/volvox' )
11- const APP_BINARY = resolve ( __dirname , '../dist/linux-unpacked/jbrowse-desktop' )
11+ const isWindows = process . platform === 'win32'
12+ const APP_BINARY = resolve (
13+ __dirname ,
14+ isWindows
15+ ? '../dist/win-unpacked/JBrowse 2.exe'
16+ : '../dist/linux-unpacked/jbrowse-desktop' ,
17+ )
1218const CHROMEDRIVER_PORT = 9515
1319
1420// Check for headless mode via CLI arg or environment variable
@@ -19,7 +25,11 @@ const isHeadless =
1925const electronChromedriverDir = dirname (
2026 require . resolve ( 'electron-chromedriver/package.json' ) ,
2127)
22- const CHROMEDRIVER_PATH = join ( electronChromedriverDir , 'bin' , 'chromedriver' )
28+ const CHROMEDRIVER_PATH = join (
29+ electronChromedriverDir ,
30+ 'bin' ,
31+ isWindows ? 'chromedriver.exe' : 'chromedriver' ,
32+ )
2333
2434const delay = ( ms : number ) => new Promise ( resolve => setTimeout ( resolve , ms ) )
2535
You can’t perform that action at this time.
0 commit comments