File tree Expand file tree Collapse file tree 3 files changed +23
-16
lines changed
Expand file tree Collapse file tree 3 files changed +23
-16
lines changed Original file line number Diff line number Diff line change 2929 - name : Install Playwright Browsers
3030 run : npx playwright install --with-deps
3131
32+ - name : Clean up conflicting DB data
33+ run : |
34+ sudo rm -rf postgres-data
35+ sudo rm -rf pgdata
36+ sudo rm -rf .postgres-data
37+
3238 - name : Create and Source .env
3339 run : |
34- # إنشاء الملف
3540 echo "DB_USER=postgres" >> .env
3641 echo "DB_PASSWORD=your_secure_password" >> .env
3742 echo "DB_NAME=postgres" >> .env
@@ -40,22 +45,14 @@ jobs:
4045 echo "POSTGRES_USER=postgres" >> .env
4146 echo "POSTGRES_PASSWORD=your_secure_password" >> .env
4247 echo "POSTGRES_DB=postgres" >> .env
43-
44- # قراءة المحتوى للتأكد
45- cat .env
4648
4749 - name : Start Services
4850 run : |
4951 source .env
5052 docker compose up -d --build
5153
52- - name : Wait for Services & Debug
53- run : |
54- sleep 30
55- docker ps -a
56- docker logs automation_pg_container || true
57-
58- # --------------------------------------------------------
54+ - name : Wait for Services
55+ run : sleep 30
5956
6057 - name : Run Playwright tests
6158 run : npx playwright test --reporter=line,allure-playwright
6562 - name : Load test report history
6663 uses : actions/checkout@v3
6764 if : always()
68- continue-on-error : true # ه
65+ continue-on-error : true
6966 with :
7067 ref : gh-pages
7168 path : gh-pages
Original file line number Diff line number Diff line change 1313
1414 steps :
1515 - uses : actions/checkout@v4
16+
1617 - uses : actions/setup-node@v4
1718 with :
1819 node-version : 18
2324 - name : Install Playwright Browsers
2425 run : npx playwright install --with-deps
2526
27+ - name : Clean up conflicting DB data
28+ run : |
29+ sudo rm -rf pgdata
30+ sudo rm -rf postgres-data
31+
2632 - name : Create .env file
2733 run : |
2834 echo "DB_USER=postgres" >> .env
@@ -40,13 +46,13 @@ jobs:
4046 - name : Wait for Services
4147 run : sleep 30
4248
43- - name : Debug DB Logs on Failure
44- if : failure()
45- run : docker logs automation_pg_container
46-
4749 - name : Run Playwright tests
4850 run : npx playwright test
4951
52+ - name : Debug DB on Failure
53+ if : failure()
54+ run : docker logs automation_pg_container
55+
5056 - uses : actions/upload-artifact@v4
5157 if : always()
5258 with :
Original file line number Diff line number Diff line change 22# Playwright
33node_modules /
44/test-results /
5+ allure-results /
56/playwright-report /
67/blob-report /
78/playwright /.cache /
9+ postgres-data /
10+ pgdata /
11+ * .log
812/playwright /.auth /
913.env
You can’t perform that action at this time.
0 commit comments