feat: add enum charts and E2E tests #19
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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: macos-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version: "1.23" | |
| - name: Build backend binary | |
| run: | | |
| mkdir -p electron-app/binaries | |
| cd backend/cmd && go build -o ../../electron-app/binaries/backend-darwin-arm64 . | |
| - name: Patch backend config | |
| run: | | |
| sed -i '' 's/validate = true/validate = false/' backend/cmd/dev-config.toml | |
| sed -i '' 's/^branch = .*/branch = "software"/' backend/cmd/dev-config.toml | |
| cp backend/cmd/dev-config.toml electron-app/config.toml | |
| - name: Add loopback aliases required by backend | |
| run: sudo ifconfig lo0 alias 127.0.0.9 | |
| - name: Debug - test backend binary | |
| run: | | |
| ./electron-app/binaries/backend-darwin-arm64 --config backend/cmd/dev-config.toml 2>&1 & | |
| PID=$! | |
| sleep 5 | |
| kill $PID 2>/dev/null || true | |
| continue-on-error: true | |
| - uses: pnpm/action-setup@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| cache: "pnpm" | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - 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 | |
| - name: Upload test report | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: playwright-report | |
| path: e2e/playwright-report/ | |
| retention-days: 7 |