@@ -44,39 +44,44 @@ jobs:
4444 npm ci
4545 node src/main.js
4646
47- cypress- e2e-tests :
47+ e2e-tests :
4848 name : E2E
49+ defaults :
50+ run :
51+ working-directory : frontend
4952 runs-on : ubuntu-22.04
53+ timeout-minutes : 5
5054 strategy :
5155 matrix :
52- browser : [chrome, firefox, edge]
53- timeout-minutes : 5
56+ project : [ chromium, Google Chrome, firefox, safari, Microsoft Edge ]
5457 steps :
5558 - uses : actions/checkout@v4
56- - id : cache-npm
57- uses : actions/cache@v4
59+ name : Checkout
60+ - uses : actions/setup-node@v4
61+ name : Setup Node
5862 with :
59- path : ~/.npm
60- key : ${{ runner.os }}-build-cache-node-modules-${{ hashFiles('**/package-lock.json') }}
61- restore-keys : |
62- ${{ runner.os }}-build-cache-node-modules-
63- ${{ runner.os }}-build-
64- ${{ runner.os }}-
63+ node-version : 20
64+ cache : ' npm'
65+ cache-dependency-path : frontend/package-lock.json
66+ - name : Install dependencies
67+ run : |
68+ npm ci
69+ npx playwright install --with-deps
6570
66- - uses : cypress-io/github-action@v6
71+ - name : Run Tests
6772 env :
68- CYPRESS_baseUrl : https://${{ github.event.repository.name }}-${{ inputs.target }}-frontend.${{ env.DOMAIN }}/
69- with :
70- config : pageLoadTimeout=10000
71- working-directory : ./frontend
72- browser : ${{ matrix.browser }}
73+ E2E_BASE_URL : https://${{ github.event.repository.name }}-${{ inputs.target }}-frontend.${{ env.DOMAIN }}/
74+ CI : ' true'
75+ run : |
76+ npx playwright test --project="${{ matrix.project }}" --reporter=html
7377
7478 - uses : actions/upload-artifact@v4
75- if : failure()
79+ if : ${{ !cancelled() }}
80+ name : upload results
7681 with :
77- name : cypress-screenshots
78- path : ./cypress/screenshots
79- if-no-files-found : ignore # 'warn' or 'error' are also available, defaults to `warn`
82+ name : playwright-report-${{ matrix.project }}
83+ path : " ./frontend/playwright-report " # path from current folder
84+ retention-days : 7
8085
8186 load-tests :
8287 name : Load
0 commit comments