-
Notifications
You must be signed in to change notification settings - Fork 2
76 lines (63 loc) · 2.1 KB
/
e2e-tests.yaml
File metadata and controls
76 lines (63 loc) · 2.1 KB
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
74
75
76
name: E2E Tests
on:
pull_request:
branches:
- main
- develop
- production
- "frontend/**"
- "control-station/**"
- "testing-view/**"
- "e2e/**"
paths:
- "frontend/testing-view/**"
- "electron-app/**"
- "e2e/**"
- "pnpm-lock.yaml"
- ".github/workflows/e2e-tests.yaml"
jobs:
e2e:
name: Playwright E2E Tests
runs-on: windows-latest
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.23"
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: "20"
- name: Install dependencies
run: pnpm install --frozen-lockfile --filter "testing-view..." --filter "e2e..." --filter "hyperloop-control-station..."
- name: Build backend binary
run: |
mkdir -p electron-app/binaries
cd backend/cmd && go build -o ../../electron-app/binaries/backend-windows-amd64.exe .
- name: Patch backend config
run: sed -i 's/validate = true/validate = false/' backend/cmd/dev-config.toml
- name: Debug - test backend binary
run: |
./electron-app/binaries/backend-windows-amd64.exe --config backend/cmd/dev-config.toml 2>&1 &
PID=$!
sleep 5
kill $PID 2>/dev/null || true
continue-on-error: true
- name: Install Electron binary
run: node node_modules/electron/install.js
working-directory: e2e
- name: Debug - verify Electron binary
run: |
node -e "const e = require('electron'); console.log('Electron path:', e);"
ls -la "$(node -e "process.stdout.write(require('electron'))")"
working-directory: e2e
- name: Build testing-view (e2e mode)
run: |
pnpm --filter testing-view build:e2e
mkdir -p electron-app/renderer/testing-view
cp -r frontend/testing-view/dist/. electron-app/renderer/testing-view/
- name: Run UI tests
run: pnpm --filter e2e exec playwright test tests/ui/