66 - main
77
88# ───────────────────────────────────────────────────────────────
9- # 1. Playwright tests → artifacts
9+ # 1. Playwright tests → artifacts
1010# ───────────────────────────────────────────────────────────────
1111jobs :
1212 test :
@@ -137,16 +137,6 @@ jobs:
137137 name : playwright-metrics
138138 path : dl
139139
140- - name : Prepare metrics file
141- run : |
142- if [ -f dl/playwright-metrics-pr.json ]; then
143- cp dl/playwright-metrics-pr.json dl/playwright-metrics.json
144- echo "✅ Copied playwright-metrics-pr.json to playwright-metrics.json"
145- else
146- echo "⚠️ Warning: playwright-metrics-pr.json not found"
147- ls -la dl/
148- fi
149-
150140 - name : Download PR HTML report
151141 uses : actions/download-artifact@v4
152142 with :
@@ -165,6 +155,26 @@ jobs:
165155 name : lint-summary
166156 path : dl
167157
158+ # CRITICAL: Ensure PR metrics are used for visualization
159+ - name : Prepare artifact files
160+ run : |
161+ echo "📁 Downloaded artifacts:"
162+ ls -la dl/
163+
164+ # Ensure the PR metrics file is properly named
165+ if [ -f dl/playwright-metrics-pr.json ]; then
166+ cp dl/playwright-metrics-pr.json dl/playwright-metrics.json
167+ echo "✅ Using PR metrics for visualization"
168+ else
169+ echo "❌ PR metrics file not found!"
170+ fi
171+
172+ # Ensure PR summary is properly named
173+ if [ -f dl/playwright-summary-pr.json ] && [ ! -f dl/playwright-summary.json ]; then
174+ cp dl/playwright-summary-pr.json dl/playwright-summary.json
175+ echo "✅ Using PR summary"
176+ fi
177+
168178 # Build dashboard, post comment, deploy Pages
169179 - id : review
170180 name : Dashboard / PR comment / Pages
@@ -174,4 +184,4 @@ jobs:
174184 mode : dashboard-only
175185 custom-artifacts-path : dl
176186 enable-github-pages : ' true'
177- enable-visual-comparison : ' true'
187+ enable-visual-comparison : ' true'
0 commit comments