-
Notifications
You must be signed in to change notification settings - Fork 1
64 lines (51 loc) · 1.47 KB
/
Copy pathe2e-tests.yml
File metadata and controls
64 lines (51 loc) · 1.47 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
name: E2E Tests
on:
push:
branches: [master]
pull_request:
branches: [master]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
e2e-tests:
runs-on: ubuntu-latest
timeout-minutes: 30
env:
CI: true
NODE_ENV: test
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 9
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'pnpm'
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Install system dependencies for Electron
run: |
sudo apt-get update
sudo apt-get install -y libnss3 libatk-bridge2.0-0 libgtk-3-0 libgbm1 libasound2t64
- name: Run unit tests
run: pnpm test:unit
- name: Build Electron app
run: pnpm test:build
- name: Run E2E tests with Xvfb
run: xvfb-run --auto-servernum --server-args="-screen 0 1920x1080x24" pnpm exec playwright test
env:
PINECONE_API_KEY: ${{ secrets.PINECONE_API_KEY }}
- name: Upload test artifacts
if: always()
uses: actions/upload-artifact@v4
with:
name: playwright-report
path: |
playwright-report/
test-results/
retention-days: 7