File tree Expand file tree Collapse file tree 1 file changed +25
-3
lines changed Expand file tree Collapse file tree 1 file changed +25
-3
lines changed Original file line number Diff line number Diff line change @@ -17,14 +17,36 @@ jobs:
17
17
run : npm ci
18
18
- name : Install Playwright Browsers
19
19
run : npx playwright install --with-deps
20
+ - name : Build the project
21
+ run : npm run build
22
+ env :
23
+ NEXT_PUBLIC_GRAPHQL_URL : ${{ secrets.NEXT_PUBLIC_GRAPHQL_URL }}
24
+ - name : Start the application
25
+ run : npm run start &
26
+ env :
27
+ NEXT_PUBLIC_GRAPHQL_URL : ${{ secrets.NEXT_PUBLIC_GRAPHQL_URL }}
28
+ - name : Wait for the application to be ready
29
+ run : |
30
+ echo "Waiting for the application to be ready..."
31
+ timeout 300 bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' localhost:3000)" != "200" ]]; do sleep 5; done' || false
32
+ echo "Application is ready!"
20
33
- name : Run Playwright tests
21
34
run : npx playwright test
22
35
env :
23
- CI : true
24
- NEXT_PUBLIC_GRAPHQL_URL : ${{ secrets.NEXT_PUBLIC_GRAPHQL_URL }}
25
- - uses : actions/upload-artifact@v4
36
+ CI : true
37
+ NEXT_PUBLIC_GRAPHQL_URL : ${{ secrets.NEXT_PUBLIC_GRAPHQL_URL }}
38
+ DEBUG : pw:api
39
+ - name : Upload test results
26
40
if : always()
41
+ uses : actions/upload-artifact@v4
27
42
with :
28
43
name : playwright-report
29
44
path : playwright-report/
30
45
retention-days : 30
46
+ - name : Upload test traces
47
+ if : failure()
48
+ uses : actions/upload-artifact@v4
49
+ with :
50
+ name : playwright-traces
51
+ path : test-results/
52
+ retention-days : 30
You can’t perform that action at this time.
0 commit comments