Skip to content

Commit b6a60bd

Browse files
committed
ci: Run ReJest self-tests and verify CI catches failing tests
1 parent bb6c40b commit b6a60bd

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

.github/workflows/runtime-tests-ios.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,3 +93,22 @@ jobs:
9393
|| node scripts/runtime-tests-server.js --launch --library worklets
9494
--configuration "$CONFIGURATION" --skip-build --connect-timeout 900 --idle-timeout 900
9595
${{ inputs.bundleMode && '--include "bundle mode core"' || '' }}
96+
97+
- name: Run ReJest self-tests (reuses the build, retries once)
98+
working-directory: ${{ env.WORKING_DIRECTORY }}
99+
run: >-
100+
node scripts/runtime-tests-server.js --launch --library self-tests
101+
--configuration "$CONFIGURATION" --skip-build --connect-timeout 900 --idle-timeout 900
102+
|| node scripts/runtime-tests-server.js --launch --library self-tests
103+
--configuration "$CONFIGURATION" --skip-build --connect-timeout 900 --idle-timeout 900
104+
105+
# The "intentional failures" suite only contains failing tests; the runner
106+
# exiting zero here would mean CI cannot catch real failures.
107+
- name: Verify CI catches failing tests
108+
working-directory: ${{ env.WORKING_DIRECTORY }}
109+
run: >-
110+
if node scripts/runtime-tests-server.js --launch --library self-tests
111+
--configuration "$CONFIGURATION" --skip-build --connect-timeout 900 --idle-timeout 900
112+
--only "intentional failures";
113+
then echo "A failing suite did not fail the runner" && exit 1;
114+
else echo "Failing tests correctly failed the runner"; fi

0 commit comments

Comments
 (0)