Skip to content

Commit cc034ff

Browse files
CreatmanCEOclaude
andcommitted
fix(ci): trust config reporters for Playwright results.json output
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 966a0da commit cc034ff

1 file changed

Lines changed: 12 additions & 3 deletions

File tree

.github/workflows/ci.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,20 @@ jobs:
9494
working-directory: tests/fixtures/demo-app
9595
run: |
9696
mkdir -p reports/run-ci
97-
npx playwright test --project chromium-mobile --reporter=json,list \
97+
# Trust config reporters (list + json with outputFile + html); don't override
98+
npx playwright test --project chromium-mobile \
9899
> reports/run-ci/playwright-stdout.txt 2>&1 || true
99-
# Move Playwright's results.json into the run dir
100-
cp test-results/results.json reports/run-ci/results.json || \
100+
ls -la test-results/ playwright-report/ 2>&1 || true
101+
# Find results.json wherever Playwright wrote it
102+
if [ -f test-results/results.json ]; then
103+
cp test-results/results.json reports/run-ci/results.json
104+
elif [ -f playwright-report/results.json ]; then
101105
cp playwright-report/results.json reports/run-ci/results.json
106+
else
107+
echo "ERROR: Playwright did not write results.json"
108+
cat reports/run-ci/playwright-stdout.txt
109+
exit 1
110+
fi
102111
python ../../../scripts/run_suite.py --cwd . --out reports/run-ci --skip-run
103112
python ../../../scripts/fingerprint_bugs.py \
104113
--current reports/run-ci/raw_bugs.json \

0 commit comments

Comments
 (0)