Skip to content

Commit 73d55b7

Browse files
committed
fixup! fixup! front: add stdcm simulation sheet e2e test
Signed-off-by: maymanaf <med.aymen.naf@gmail.com>
1 parent 6bdb6b0 commit 73d55b7

File tree

1 file changed

+25
-3
lines changed

1 file changed

+25
-3
lines changed

.github/workflows/build.yml

+25-3
Original file line numberDiff line numberDiff line change
@@ -1096,12 +1096,34 @@ jobs:
10961096

10971097
- name: Run Playwright tests
10981098
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 \
11001101
-e CI=true \
11011102
--ipc=host \
11021103
-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)
11051127
11061128
- uses: actions/upload-artifact@v4
11071129
if: always()

0 commit comments

Comments
 (0)