Unverified Commit ba2185a0 authored by Dmitry Tokarev's avatar Dmitry Tokarev Committed by GitHub
Browse files

fix: flatten imported dashboard results for Allure 3 scanner (#7963)


Signed-off-by: default avatarDmitry Tokarev <dtokarev@nvidia.com>
Co-authored-by: default avatarClaude Opus 4.6 (1M context) <noreply@anthropic.com>
parent 317b9614
......@@ -94,15 +94,6 @@ jobs:
run: |
git fetch origin gh-pages:gh-pages 2>/dev/null || echo "No gh-pages branch yet"
# Restore history for Allure 3 report (primary, at allure/${SUBDIR}/)
# Allure 3 uses history.jsonl (not history/*.json like Allure 2)
if git show "gh-pages:allure/${SUBDIR}/history.jsonl" 2>/dev/null; then
git show "gh-pages:allure/${SUBDIR}/history.jsonl" > allure-v3-history.jsonl
echo "Restored Allure 3 history.jsonl from gh-pages/allure/${SUBDIR}"
else
echo "No previous Allure 3 history found"
fi
# Restore history for Allure 2 report (at allure/v2/${SUBDIR}/)
if git show "gh-pages:allure/v2/${SUBDIR}/history" 2>/dev/null; then
mkdir -p allure-results/history
......@@ -119,20 +110,6 @@ jobs:
run: |
./allure2-cli/bin/allure generate allure-results -o allure-report --clean
- name: Generate Allure 3 Report
if: steps.check-results.outputs.has_results == 'true'
run: |
mkdir -p allure-v3-workspace/allure-results
# Copy results but exclude Allure 2 history dir to avoid format confusion
rsync -a --exclude='history' allure-results/ allure-v3-workspace/allure-results/
# Restore Allure 3 history.jsonl into the workspace
if [ -f allure-v3-history.jsonl ]; then
cp allure-v3-history.jsonl allure-v3-workspace/history.jsonl
fi
# historyPath requires a config file
echo 'export default { historyPath: "./history.jsonl" };' > allure-v3-workspace/allurerc.mjs
npx allure generate --config="${GITHUB_WORKSPACE}/allure-v3-workspace/allurerc.mjs" --cwd allure-v3-workspace -o allure-report-v3
- name: Generate unified dashboard
if: steps.check-results.outputs.has_results == 'true'
env:
......@@ -149,18 +126,18 @@ jobs:
for dir in pr post-merge nightly release; do
if [ "$dir" = "$SUBDIR" ]; then continue; fi
if git show "gh-pages:dashboard-results/${dir}" 2>/dev/null; then
mkdir -p "unified-workspace/allure-results/${dir}-imported"
git archive gh-pages "dashboard-results/${dir}" | tar -x -C /tmp/
cp -r "/tmp/dashboard-results/${dir}/"* "unified-workspace/allure-results/${dir}-imported/" 2>/dev/null || true
cp -r "/tmp/dashboard-results/${dir}/"* "unified-workspace/allure-results/" 2>/dev/null || true
fi
done
# Restore unified dashboard history for trend charts
# Restore unified dashboard history for trend charts (or seed empty file)
if git show "gh-pages:allure/history.jsonl" 2>/dev/null; then
git show "gh-pages:allure/history.jsonl" > unified-workspace/history.jsonl
echo "Restored unified dashboard history from gh-pages"
else
echo "No previous unified dashboard history found"
touch unified-workspace/history.jsonl
fi
# Generate unified dashboard using allurerc.mjs
......@@ -189,23 +166,6 @@ jobs:
git checkout --orphan gh-pages
fi
# One-time cleanup: remove old path layout from before allure/ prefix migration
for old_dir in allure-all pre-merge pre-merge-v2 post-merge post-merge-v2 nightly nightly-v2 release release-v2; do
if [ -d "$old_dir" ]; then
echo "Removing legacy directory: $old_dir"
rm -rf "$old_dir"
fi
done
# Deploy Allure 3 report (primary)
mkdir -p "allure/${SUBDIR}"
rm -rf "allure/${SUBDIR}/"*
cp -r "${GITHUB_WORKSPACE}/allure-report-v3/"* "allure/${SUBDIR}/"
# Persist Allure 3 history.jsonl for trend charts
if [ -f "${GITHUB_WORKSPACE}/allure-v3-workspace/history.jsonl" ]; then
cp "${GITHUB_WORKSPACE}/allure-v3-workspace/history.jsonl" "allure/${SUBDIR}/history.jsonl"
fi
# Deploy Allure 2 report
mkdir -p "allure/v2/${SUBDIR}"
rm -rf "allure/v2/${SUBDIR}/"*
......@@ -216,7 +176,7 @@ jobs:
rm -rf "dashboard-results/${SUBDIR}/"*
rsync -a --exclude='history' "${GITHUB_WORKSPACE}/allure-results/" "dashboard-results/${SUBDIR}/"
# Deploy unified dashboard (overwrites report files, preserves subdirs)
# Deploy unified dashboard (per-workflow tabs generated by allurerc.mjs plugins)
mkdir -p allure
cp -r "${GITHUB_WORKSPACE}/allure-all-report/"* allure/
# Persist history.jsonl for trend charts
......@@ -248,6 +208,5 @@ jobs:
run: |
echo "## Allure Reports" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "- [Allure Report](https://ai-dynamo.github.io/dynamo/allure/${SUBDIR}/)" >> $GITHUB_STEP_SUMMARY
echo "- [Allure Dashboard](https://ai-dynamo.github.io/dynamo/allure/)" >> $GITHUB_STEP_SUMMARY
echo "- [Allure 2 Report](https://ai-dynamo.github.io/dynamo/allure/v2/${SUBDIR}/)" >> $GITHUB_STEP_SUMMARY
echo "- [Unified Dashboard](https://ai-dynamo.github.io/dynamo/allure/)" >> $GITHUB_STEP_SUMMARY
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment