1+ name : Build Web Application
2+
3+ on :
4+ push :
5+ branches : [ main, develop, 'feature/*', 'fix/*', 'copilot/*' ]
6+ paths-ignore :
7+ - ' docs/**'
8+ - ' *.md'
9+ pull_request :
10+ branches : [ main, develop ]
11+ paths-ignore :
12+ - ' docs/**'
13+ - ' *.md'
14+ workflow_dispatch :
15+
16+ jobs :
17+ build-web :
18+ runs-on : ubuntu-latest
19+
20+ steps :
21+ - name : Checkout code
22+ uses : actions/checkout@v4
23+
24+ - name : Setup Node.js
25+ uses : actions/setup-node@v4
26+ with :
27+ node-version-file : ' .nvmrc'
28+ cache : ' yarn'
29+
30+ - name : Install dependencies
31+ run : |
32+ for i in 1 2 3; do
33+ yarn install --frozen-lockfile && break || sleep 10
34+ done
35+
36+ - name : Build web application
37+ run : ./scripts/build-web.sh
38+
39+ - name : Upload web artifacts
40+ uses : actions/upload-artifact@v4
41+ with :
42+ name : web-build-${{ github.sha }}
43+ path : deploy_*/
44+ retention-days : 30
45+
46+ build-extensions :
47+ runs-on : ubuntu-latest
48+ needs : build-web
49+ steps :
50+ - name : Checkout code
51+ uses : actions/checkout@v4
52+
53+ - name : Setup Node.js
54+ uses : actions/setup-node@v4
55+ with :
56+ node-version-file : ' .nvmrc'
57+ cache : ' yarn'
58+
59+ - name : Install dependencies
60+ run : |
61+ for i in 1 2 3; do
62+ yarn install --frozen-lockfile && break || sleep 10
63+ done
64+
65+ - name : Build browser extensions
66+ run : ./scripts/build-extensions.sh
67+
68+ - name : Upload extension artifacts
69+ uses : actions/upload-artifact@v4
70+ with :
71+ name : browser-extensions-${{ github.sha }}
72+ path : |
73+ extension/*.zip
74+ extension/extension-build-info.txt
75+ retention-days : 30
76+
77+ test :
78+ runs-on : ubuntu-latest
79+ needs : build-web
80+ steps :
81+ - name : Checkout code
82+ uses : actions/checkout@v4
83+
84+ - name : Setup Node.js
85+ uses : actions/setup-node@v4
86+ with :
87+ node-version-file : ' .nvmrc'
88+ cache : ' yarn'
89+
90+ - name : Install dependencies
91+ run : |
92+ for i in 1 2 3; do
93+ yarn install --frozen-lockfile && break || sleep 10
94+ done
95+
96+ - name : Download web build artifacts
97+ uses : actions/download-artifact@v4
98+ with :
99+ name : web-build-${{ github.sha }}
100+ path : deploy_latest
101+
102+ - name : Run tests
103+ run : yarn test --watchAll=false --coverage
104+
105+ - name : Install Playwright
106+ run : yarn playwright:install
107+
108+ - name : Run E2E tests
109+ run : yarn test:e2e
110+ env :
111+ # Use local build for E2E tests if needed
112+ PLAYWRIGHT_BASE_URL : http://localhost:3000
113+
114+ - name : Upload test results
115+ uses : actions/upload-artifact@v4
116+ if : always()
117+ with :
118+ name : test-results-${{ github.sha }}
119+ path : |
120+ coverage/
121+ playwright-report/
122+ retention-days : 7
0 commit comments