Skip to content

Commit 182a7d9

Browse files
authored
Merge pull request #3 from Hyperloop-UPV/testing-view/enum-charts
Testing view/enum charts
2 parents 083a66f + 92d486a commit 182a7d9

81 files changed

Lines changed: 2182 additions & 541 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/build.yaml

Lines changed: 0 additions & 210 deletions
This file was deleted.

.github/workflows/e2e-tests.yaml

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
name: E2E Tests
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
- develop
8+
- production
9+
- "frontend/**"
10+
- "control-station/**"
11+
- "testing-view/**"
12+
- "e2e/**"
13+
paths:
14+
- "frontend/testing-view/**"
15+
- "electron-app/**"
16+
- "e2e/**"
17+
- "pnpm-lock.yaml"
18+
- ".github/workflows/e2e-tests.yaml"
19+
20+
jobs:
21+
e2e:
22+
name: Playwright E2E Tests
23+
runs-on: macos-latest
24+
steps:
25+
- uses: actions/checkout@v4
26+
27+
- uses: actions/setup-go@v5
28+
with:
29+
go-version: "1.23"
30+
31+
- name: Build backend binary
32+
run: |
33+
mkdir -p electron-app/binaries
34+
cd backend/cmd && go build -o ../../electron-app/binaries/backend-darwin-arm64 .
35+
36+
- name: Patch backend config
37+
run: sed -i '' 's/validate = true/validate = false/' backend/cmd/dev-config.toml
38+
39+
- name: Add loopback aliases required by backend
40+
run: sudo ifconfig lo0 alias 127.0.0.9
41+
42+
- name: Debug - test backend binary
43+
run: |
44+
./electron-app/binaries/backend-darwin-arm64 --config backend/cmd/dev-config.toml 2>&1 &
45+
PID=$!
46+
sleep 5
47+
kill $PID 2>/dev/null || true
48+
continue-on-error: true
49+
50+
- uses: pnpm/action-setup@v4
51+
52+
- uses: actions/setup-node@v4
53+
with:
54+
node-version: "20"
55+
cache: "pnpm"
56+
57+
- name: Install dependencies
58+
run: pnpm install --frozen-lockfile
59+
60+
- name: Install Electron binary
61+
run: node node_modules/electron/install.js
62+
working-directory: e2e
63+
64+
- name: Debug - verify Electron binary
65+
run: |
66+
node -e "const e = require('electron'); console.log('Electron path:', e);"
67+
ls -la "$(node -e "process.stdout.write(require('electron'))")"
68+
working-directory: e2e
69+
70+
- name: Build testing-view (e2e mode)
71+
run: |
72+
pnpm --filter testing-view build:e2e
73+
mkdir -p electron-app/renderer/testing-view
74+
cp -r frontend/testing-view/dist/. electron-app/renderer/testing-view/
75+
76+
- name: Run UI tests
77+
run: pnpm --filter e2e exec playwright test tests/ui/
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Electron Tests
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
- develop
8+
- production
9+
- "frontend/**"
10+
- "control-station/**"
11+
- "testing-view/**"
12+
paths:
13+
- "electron-app/**"
14+
- ".github/workflows/electron-tests.yaml"
15+
16+
jobs:
17+
test:
18+
name: Run Electron Unit Tests
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/checkout@v4
22+
23+
- uses: pnpm/action-setup@v4
24+
25+
- uses: actions/setup-node@v4
26+
with:
27+
node-version: "20"
28+
cache: "pnpm"
29+
30+
- name: Install dependencies
31+
run: pnpm install --frozen-lockfile --filter=hyperloop-control-station
32+
33+
- name: Run tests
34+
run: pnpm test --filter=hyperloop-control-station

.github/workflows/frontend-tests.yaml

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,9 @@ on:
1414
- "pnpm-lock.yaml"
1515
- ".github/workflows/frontend-tests.yaml"
1616

17-
push:
18-
branches:
19-
- "frontend/**"
20-
- "testing-view/**"
21-
- "competition-view/**"
22-
paths:
23-
- "frontend/**"
24-
- "pnpm-lock.yaml"
25-
- ".github/workflows/frontend-tests.yaml"
26-
2717
jobs:
2818
test:
29-
name: Run Frontend Tests
19+
name: Run Frontend Unit Tests
3020
runs-on: ubuntu-latest
3121
steps:
3222
- uses: actions/checkout@v4

0 commit comments

Comments
 (0)