| Sean McCullough | e8d6b80 | 2025-04-21 19:02:05 -0700 | [diff] [blame] | 1 | name: WebUI Tests |
| 2 | on: |
| 3 | workflow_call: |
| 4 | push: |
| 5 | branches-ignore: |
| 6 | - "queue-main-**" |
| 7 | paths: |
| 8 | - 'loop/webui/**' |
| 9 | pull_request: |
| 10 | paths: |
| 11 | - 'loop/webui/**' |
| 12 | |
| 13 | jobs: |
| 14 | test: |
| 15 | runs-on: ubuntu-latest |
| 16 | steps: |
| 17 | - uses: actions/checkout@v4 |
| 18 | |
| 19 | - name: Setup Node.js |
| 20 | uses: actions/setup-node@v4 |
| 21 | with: |
| 22 | node-version: '20' |
| 23 | cache: 'npm' |
| 24 | cache-dependency-path: loop/webui/package-lock.json |
| 25 | |
| 26 | - name: Install dependencies |
| 27 | working-directory: ./loop/webui |
| 28 | run: npm ci |
| 29 | |
| 30 | - name: Install Playwright browsers |
| 31 | working-directory: ./loop/webui |
| 32 | run: npx playwright install --with-deps |
| 33 | |
| 34 | - name: Run tests |
| 35 | working-directory: ./loop/webui |
| 36 | run: npm run test |
| 37 | |
| 38 | - name: Upload test results |
| 39 | if: always() |
| 40 | uses: actions/upload-artifact@v4 |
| 41 | with: |
| 42 | name: playwright-report |
| 43 | path: loop/webui/playwright-report/ |
| 44 | retention-days: 7 |