9494 run : |
9595 git fetch origin gh-pages:gh-pages 2>/dev/null || echo "No gh-pages branch yet"
9696
97- # Restore history for Allure 3 report (primary, at allure/${SUBDIR}/)
98- # Allure 3 uses history.jsonl (not history/*.json like Allure 2)
99- if git show "gh-pages:allure/${SUBDIR}/history.jsonl" 2>/dev/null; then
100- git show "gh-pages:allure/${SUBDIR}/history.jsonl" > allure-v3-history.jsonl
101- echo "Restored Allure 3 history.jsonl from gh-pages/allure/${SUBDIR}"
102- else
103- echo "No previous Allure 3 history found"
104- fi
105-
10697 # Restore history for Allure 2 report (at allure/v2/${SUBDIR}/)
10798 if git show "gh-pages:allure/v2/${SUBDIR}/history" 2>/dev/null; then
10899 mkdir -p allure-results/history
@@ -119,20 +110,6 @@ jobs:
119110 run : |
120111 ./allure2-cli/bin/allure generate allure-results -o allure-report --clean
121112
122- - name : Generate Allure 3 Report
123- if : steps.check-results.outputs.has_results == 'true'
124- run : |
125- mkdir -p allure-v3-workspace/allure-results
126- # Copy results but exclude Allure 2 history dir to avoid format confusion
127- rsync -a --exclude='history' allure-results/ allure-v3-workspace/allure-results/
128- # Restore Allure 3 history.jsonl into the workspace
129- if [ -f allure-v3-history.jsonl ]; then
130- cp allure-v3-history.jsonl allure-v3-workspace/history.jsonl
131- fi
132- # historyPath requires a config file
133- echo 'export default { historyPath: "./history.jsonl" };' > allure-v3-workspace/allurerc.mjs
134- npx allure generate --config="${GITHUB_WORKSPACE}/allure-v3-workspace/allurerc.mjs" --cwd allure-v3-workspace -o allure-report-v3
135-
136113 - name : Generate unified dashboard
137114 if : steps.check-results.outputs.has_results == 'true'
138115 env :
@@ -149,18 +126,18 @@ jobs:
149126 for dir in pr post-merge nightly release; do
150127 if [ "$dir" = "$SUBDIR" ]; then continue; fi
151128 if git show "gh-pages:dashboard-results/${dir}" 2>/dev/null; then
152- mkdir -p "unified-workspace/allure-results/${dir}-imported"
153129 git archive gh-pages "dashboard-results/${dir}" | tar -x -C /tmp/
154- cp -r "/tmp/dashboard-results/${dir}/"* "unified-workspace/allure-results/${dir}-imported/ " 2>/dev/null || true
130+ cp -r "/tmp/dashboard-results/${dir}/"* "unified-workspace/allure-results/" 2>/dev/null || true
155131 fi
156132 done
157133
158- # Restore unified dashboard history for trend charts
134+ # Restore unified dashboard history for trend charts (or seed empty file)
159135 if git show "gh-pages:allure/history.jsonl" 2>/dev/null; then
160136 git show "gh-pages:allure/history.jsonl" > unified-workspace/history.jsonl
161137 echo "Restored unified dashboard history from gh-pages"
162138 else
163139 echo "No previous unified dashboard history found"
140+ touch unified-workspace/history.jsonl
164141 fi
165142
166143 # Generate unified dashboard using allurerc.mjs
@@ -189,23 +166,6 @@ jobs:
189166 git checkout --orphan gh-pages
190167 fi
191168
192- # One-time cleanup: remove old path layout from before allure/ prefix migration
193- for old_dir in allure-all pre-merge pre-merge-v2 post-merge post-merge-v2 nightly nightly-v2 release release-v2; do
194- if [ -d "$old_dir" ]; then
195- echo "Removing legacy directory: $old_dir"
196- rm -rf "$old_dir"
197- fi
198- done
199-
200- # Deploy Allure 3 report (primary)
201- mkdir -p "allure/${SUBDIR}"
202- rm -rf "allure/${SUBDIR}/"*
203- cp -r "${GITHUB_WORKSPACE}/allure-report-v3/"* "allure/${SUBDIR}/"
204- # Persist Allure 3 history.jsonl for trend charts
205- if [ -f "${GITHUB_WORKSPACE}/allure-v3-workspace/history.jsonl" ]; then
206- cp "${GITHUB_WORKSPACE}/allure-v3-workspace/history.jsonl" "allure/${SUBDIR}/history.jsonl"
207- fi
208-
209169 # Deploy Allure 2 report
210170 mkdir -p "allure/v2/${SUBDIR}"
211171 rm -rf "allure/v2/${SUBDIR}/"*
@@ -216,7 +176,7 @@ jobs:
216176 rm -rf "dashboard-results/${SUBDIR}/"*
217177 rsync -a --exclude='history' "${GITHUB_WORKSPACE}/allure-results/" "dashboard-results/${SUBDIR}/"
218178
219- # Deploy unified dashboard (overwrites report files, preserves subdirs )
179+ # Deploy unified dashboard (per-workflow tabs generated by allurerc.mjs plugins )
220180 mkdir -p allure
221181 cp -r "${GITHUB_WORKSPACE}/allure-all-report/"* allure/
222182 # Persist history.jsonl for trend charts
@@ -248,6 +208,5 @@ jobs:
248208 run : |
249209 echo "## Allure Reports" >> $GITHUB_STEP_SUMMARY
250210 echo "" >> $GITHUB_STEP_SUMMARY
251- echo "- [Allure Report ](https://ai-dynamo.github.io/dynamo/allure/${SUBDIR} /)" >> $GITHUB_STEP_SUMMARY
211+ echo "- [Allure Dashboard ](https://ai-dynamo.github.io/dynamo/allure/)" >> $GITHUB_STEP_SUMMARY
252212 echo "- [Allure 2 Report](https://ai-dynamo.github.io/dynamo/allure/v2/${SUBDIR}/)" >> $GITHUB_STEP_SUMMARY
253- echo "- [Unified Dashboard](https://ai-dynamo.github.io/dynamo/allure/)" >> $GITHUB_STEP_SUMMARY
0 commit comments