Skip to content
This repository was archived by the owner on Jan 28, 2026. It is now read-only.

Commit f5177de

Browse files
authored
Merge pull request #137 from DigitalProductInnovationAndDevelopment/feature/opt
optimize test
2 parents 5b79934 + 30f1cc7 commit f5177de

3 files changed

Lines changed: 481 additions & 249 deletions

File tree

.github/workflows/releasetest_sep.yaml

Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
- main
77

88
# ───────────────────────────────────────────────────────────────
9-
# 1. Playwright tests → artifacts
9+
# 1. Playwright tests → artifacts
1010
# ───────────────────────────────────────────────────────────────
1111
jobs:
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'

action.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -444,14 +444,17 @@ runs:
444444
' artifacts/playwright-metrics.json > artifacts/playwright-summary-pr.json
445445
446446
fi
447-
cp artifacts/playwright-metrics-pr.json artifacts/playwright-metrics.json || true
447+
# IMPORTANT: Keep a copy of PR metrics before main branch tests
448+
if [ -f artifacts/playwright-metrics.json ]; then
449+
cp artifacts/playwright-metrics.json artifacts/playwright-metrics-pr.json
450+
echo "✅ Preserved PR metrics"
451+
fi
448452
449453
- name: Alias summary for checklist
450454
if: steps.modes.outputs.playwright == 'true'
451455
shell: bash
452456
run: |
453457
cp artifacts/playwright-summary-pr.json artifacts/playwright-summary.json || true
454-
cp artifacts/playwright-metrics.json artifacts/playwright-metrics-pr.json || true
455458
456459
# 3b ── Playwright on main branch with progress indicators
457460
- name: Run Playwright on main

0 commit comments

Comments
 (0)