Commit 73d55b7 1 parent 6bdb6b0 commit 73d55b7 Copy full SHA for 73d55b7
File tree 1 file changed +25
-3
lines changed
1 file changed +25
-3
lines changed Original file line number Diff line number Diff line change @@ -1096,12 +1096,34 @@ jobs:
1096
1096
1097
1097
- name : Run Playwright tests
1098
1098
run : |
1099
- docker run --init --name=playwright-test --net=host \
1099
+ # Run 006-stdcm.spec.ts first
1100
+ docker run --init --name=playwright-006 --net=host \
1100
1101
-e CI=true \
1101
1102
--ipc=host \
1102
1103
-v "$PWD/front/test-results:/app/front/test-results" \
1103
- osrd-playwright:latest npx playwright test
1104
- exit $(docker wait playwright-test)
1104
+ osrd-playwright:latest npx playwright test 006-stdcm.spec.ts
1105
+ exit_code_006=$(docker wait playwright-006)
1106
+
1107
+ # Conditionally run 013-stdcm-simulation-sheet.spec.ts if 006 passes
1108
+ if [ "$exit_code_006" -eq 0 ]; then
1109
+ docker run --init --name=playwright-013 --net=host \
1110
+ -e CI=true \
1111
+ --ipc=host \
1112
+ -v "$PWD/front/test-results:/app/front/test-results" \
1113
+ osrd-playwright:latest npx playwright test 013-stdcm-simulation-sheet.spec.ts
1114
+ exit_code_013=$(docker wait playwright-013)
1115
+ else
1116
+ echo "Skipping 013-stdcm-simulation-sheet.spec.ts because 006-stdcm.spec.ts failed."
1117
+ exit_code_013=0
1118
+ fi
1119
+
1120
+ # Run all other tests
1121
+ docker run --init --name=playwright-other-tests --net=host \
1122
+ -e CI=true \
1123
+ --ipc=host \
1124
+ -v "$PWD/front/test-results:/app/front/test-results" \
1125
+ osrd-playwright:latest npx playwright test --exclude 006-stdcm.spec.ts --exclude 013-stdcm-simulation-sheet.spec.ts
1126
+ exit_code_other=$(docker wait playwright-other-tests)
1105
1127
1106
1128
- uses : actions/upload-artifact@v4
1107
1129
if : always()
You can’t perform that action at this time.
0 commit comments