Skip to content

Commit 3b53600

Browse files
CopilotMossaka
andcommitted
fix: improve test result detection in playwright workflow
Co-authored-by: Mossaka <[email protected]>
1 parent 66fad7c commit 3b53600

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

.github/workflows/test-playwright.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,9 @@ jobs:
6868
- name: Run Playwright MCP tests
6969
id: run-tests
7070
run: |
71+
set +e
7172
sudo -E npm run test:integration -- playwright-mcp.test.ts 2>&1 | tee test-output.log
73+
echo "exit_code=$?" >> $GITHUB_OUTPUT
7274
continue-on-error: true
7375

7476
- name: Clean npm cache
@@ -83,8 +85,12 @@ jobs:
8385
npx tsx scripts/ci/generate-test-summary.ts "playwright-mcp.test.ts" "Playwright MCP Tests" test-output.log
8486
8587
- name: Check test results
86-
if: steps.run-tests.outcome == 'failure'
87-
run: exit 1
88+
if: always()
89+
run: |
90+
if [ "${{ steps.run-tests.outputs.exit_code }}" != "0" ]; then
91+
echo "Tests failed with exit code ${{ steps.run-tests.outputs.exit_code }}"
92+
exit 1
93+
fi
8894
8995
- name: Post-test cleanup
9096
if: always()

0 commit comments

Comments
 (0)