@@ -66,226 +66,20 @@ jobs:
6666 - name : Check linting
6767 run : cd src/frontend/ && yarn lint
6868
69- prepare-e2e :
70- runs-on : ubuntu-latest
71- needs : install-dependencies
72- timeout-minutes : 10
73- permissions :
74- contents : read
75-
76- steps :
77- - name : Checkout
78- uses : actions/checkout@v6
79-
80- - name : Setup Node.js
81- uses : actions/setup-node@v6
82- with :
83- node-version : " 22.x"
84-
85- - name : Restore the frontend cache
86- uses : actions/cache@v5
87- with :
88- path : " src/frontend/**/node_modules"
89- key : front-node_modules-${{ hashFiles('src/frontend/**/yarn.lock') }}
90- fail-on-cache-miss : true
91-
92- - name : Restore Playwright browsers cache
93- id : playwright-cache
94- uses : actions/cache/restore@v4
95- with :
96- path : ~/.cache/ms-playwright
97- key : playwright-${{ runner.os }}-${{ hashFiles('src/frontend/yarn.lock', 'src/frontend/apps/e2e/yarn.lock') }}
98- restore-keys : |
99- playwright-${{ runner.os }}-
100-
101- - name : Install Playwright browsers
102- if : steps.playwright-cache.outputs.cache-hit != 'true'
103- run : |
104- cd src/frontend/apps/e2e
105- yarn install-playwright chromium firefox webkit
106-
107- - name : Save Playwright browsers cache
108- if : steps.playwright-cache.outputs.cache-hit != 'true'
109- uses : actions/cache/save@v4
110- with :
111- path : ~/.cache/ms-playwright
112- key : ${{ steps.playwright-cache.outputs.cache-primary-key }}
113-
11469 test-e2e-chromium :
115- runs-on : ubuntu-latest
116- needs : prepare-e2e
117- timeout-minutes : 20
118- steps :
119- - name : Checkout repository
120- uses : actions/checkout@v6
121-
122- - name : Setup Node.js
123- uses : actions/setup-node@v6
124- with :
125- node-version : " 22.x"
126-
127- - name : Restore the frontend cache
128- uses : actions/cache@v5
129- with :
130- path : " src/frontend/**/node_modules"
131- key : front-node_modules-${{ hashFiles('src/frontend/**/yarn.lock') }}
132- fail-on-cache-miss : true
133-
134- - name : Set e2e env variables
135- run : cat env.d/development/common.e2e >> env.d/development/common.local
136-
137- - name : Restore Playwright browsers cache
138- uses : actions/cache@v5
139- with :
140- path : ~/.cache/ms-playwright
141- key : playwright-${{ runner.os }}-${{ hashFiles('src/frontend/yarn.lock', 'src/frontend/apps/e2e/yarn.lock') }}
142- fail-on-cache-miss : true
143-
144- - name : Free disk space before Docker
145- uses : ./.github/actions/free-disk-space
146-
147- - name : Start Docker services
148- run : make bootstrap-e2e FLUSH_ARGS='--no-input'
149-
150- - name : Restore last-run cache
151- if : ${{ github.run_attempt > 1 }}
152- id : restore-last-run
153- uses : actions/cache/restore@v4
154- with :
155- path : src/frontend/apps/e2e/test-results/.last-run.json
156- key : playwright-last-run-${{ github.run_id }}-chromium
157-
158- - name : Run e2e tests
159- env :
160- PLAYWRIGHT_LIST_PRINT_STEPS : true
161- FORCE_COLOR : true
162- run : |
163- cd src/frontend/
164-
165- LAST_FAILED_FLAG=""
166- if [ "${{ github.run_attempt }}" != "1" ]; then
167- LAST_RUN_FILE="apps/e2e/test-results/.last-run.json"
168- if [ -f "$LAST_RUN_FILE" ]; then
169- FAILED_COUNT=$(jq '.failedTests | length' "$LAST_RUN_FILE" 2>/dev/null || echo "0")
170- if [ "${FAILED_COUNT:-0}" -gt "0" ]; then
171- LAST_FAILED_FLAG="--last-failed"
172- fi
173- fi
174- fi
175-
176- yarn e2e:test --project='chromium' $LAST_FAILED_FLAG
177-
178- - name : Save last-run cache
179- if : always()
180- uses : actions/cache/save@v4
181- with :
182- path : src/frontend/apps/e2e/test-results/.last-run.json
183- key : playwright-last-run-${{ github.run_id }}-chromium
184-
185- - name : Upload last-run artifact
186- if : always()
187- uses : actions/upload-artifact@v6
188- with :
189- name : playwright-instance-last-run-chromium
190- path : src/frontend/apps/e2e/test-results/.last-run.json
191- include-hidden-files : true
192- if-no-files-found : warn
193- retention-days : 7
194-
195- - uses : actions/upload-artifact@v6
196- if : always()
197- with :
198- name : playwright-chromium-report
199- path : src/frontend/apps/e2e/report/
200- retention-days : 7
70+ uses : ./.github/workflows/e2e-tests.yml
71+ with :
72+ browser-name : chromium
73+ projects : --project=chromium
74+ timeout-minutes : 25
20175
20276 test-e2e-other-browser :
203- runs-on : ubuntu-latest
20477 needs : test-e2e-chromium
205- timeout-minutes : 30
206- steps :
207- - name : Checkout repository
208- uses : actions/checkout@v6
209-
210- - name : Setup Node.js
211- uses : actions/setup-node@v6
212- with :
213- node-version : " 22.x"
214-
215- - name : Restore the frontend cache
216- uses : actions/cache@v5
217- with :
218- path : " src/frontend/**/node_modules"
219- key : front-node_modules-${{ hashFiles('src/frontend/**/yarn.lock') }}
220- fail-on-cache-miss : true
221-
222- - name : Set e2e env variables
223- run : cat env.d/development/common.e2e >> env.d/development/common.local
224-
225- - name : Restore Playwright browsers cache
226- uses : actions/cache@v5
227- with :
228- path : ~/.cache/ms-playwright
229- key : playwright-${{ runner.os }}-${{ hashFiles('src/frontend/yarn.lock', 'src/frontend/apps/e2e/yarn.lock') }}
230- fail-on-cache-miss : true
231-
232- - name : Free disk space before Docker
233- uses : ./.github/actions/free-disk-space
234-
235- - name : Start Docker services
236- run : make bootstrap-e2e FLUSH_ARGS='--no-input'
237-
238- - name : Restore last-run cache
239- if : ${{ github.run_attempt > 1 }}
240- id : restore-last-run
241- uses : actions/cache/restore@v4
242- with :
243- path : src/frontend/apps/e2e/test-results/.last-run.json
244- key : playwright-last-run-${{ github.run_id }}-other-browser
245-
246- - name : Run e2e tests
247- env :
248- PLAYWRIGHT_LIST_PRINT_STEPS : true
249- FORCE_COLOR : true
250- run : |
251- cd src/frontend/
252-
253- LAST_FAILED_FLAG=""
254- if [ "${{ github.run_attempt }}" != "1" ]; then
255- LAST_RUN_FILE="apps/e2e/test-results/.last-run.json"
256- if [ -f "$LAST_RUN_FILE" ]; then
257- FAILED_COUNT=$(jq '.failedTests | length' "$LAST_RUN_FILE" 2>/dev/null || echo "0")
258- if [ "${FAILED_COUNT:-0}" -gt "0" ]; then
259- LAST_FAILED_FLAG="--last-failed"
260- fi
261- fi
262- fi
263-
264- yarn e2e:test --project=firefox --project=webkit $LAST_FAILED_FLAG
265-
266- - name : Save last-run cache
267- if : always()
268- uses : actions/cache/save@v4
269- with :
270- path : src/frontend/apps/e2e/test-results/.last-run.json
271- key : playwright-last-run-${{ github.run_id }}-other-browser
272-
273- - name : Upload last-run artifact
274- if : always()
275- uses : actions/upload-artifact@v6
276- with :
277- name : playwright-instance-last-run-other-browser
278- path : src/frontend/apps/e2e/test-results/.last-run.json
279- include-hidden-files : true
280- if-no-files-found : warn
281- retention-days : 7
282-
283- - uses : actions/upload-artifact@v6
284- if : always()
285- with :
286- name : playwright-other-report
287- path : src/frontend/apps/e2e/report/
288- retention-days : 7
78+ uses : ./.github/workflows/e2e-tests.yml
79+ with :
80+ browser-name : other-browser
81+ projects : --project=firefox --project=webkit
82+ timeout-minutes : 30
28983
29084 bundle-size-check :
29185 runs-on : ubuntu-latest
0 commit comments