add basic e2e tests with api mocking #22
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: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| jobs: | |
| e2e: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - name: 'Checkout code' | |
| uses: actions/checkout@v4 | |
| - name: 'Use Node.js' | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20.x' | |
| - name: 'Install npm dependencies' | |
| run: npm ci | |
| - name: 'Install Playwright Electron dependencies' | |
| run: npx playwright install --with-deps | |
| - name: 'Build Electron app' | |
| run: npx electron-vite build | |
| - name: 'Run E2E tests' | |
| run: xvfb-run --auto-servernum npx playwright test --config=e2e/playwright.config.ts |