Skip to content

ci: show all OS test results in merged Allure report - #2486

Merged
maxandersen merged 3 commits into
mainfrom
ci/allure-merge-multi-os
May 30, 2026
Merged

ci: show all OS test results in merged Allure report#2486
maxandersen merged 3 commits into
mainfrom
ci/allure-merge-multi-os

Conversation

@maxandersen

@maxandersen maxandersen commented May 30, 2026

Copy link
Copy Markdown
Collaborator

TL;DR: allure merge in main only show windows because environemnt.properties collide when merging. this moves to utilize allure's default support for handling multiple test runs by passing multiple dirs.

p.s. would NEVER or at least in any sane time have figured this out without a research agent :)

Why

The merged Allure report on main builds currently shows only Windows metadata at the top level (Environment widget). Mac/Linux test data is actually present (UUID-named result JSONs do not collide), but everything humans see on the overview page comes from a single environment.properties file — and during artifact merge the Windows copy overwrote Ubuntu's and macOS's.

Root cause

download-artifact with merge-multiple: true flattens every per-OS artifact into one directory. Fixed-name files (environment.properties, executor.json, etc.) collide; alphabetically Windows is last and wins. This also destroyed the per-launch boundary Allure uses to aggregate metadata across multiple runs.

Fix

Allure already supports this scenario natively: allure generate takes multiple results directories and treats each as a separate "launch". The Environment widget aggregates keys across launches (e.g. OS → Linux amd64, Mac OS X aarch64, Windows 10 amd64) and the Executors widget shows one row per launch.

  • build.gradleallureRawResultElements is now configurable via -PallureMergeDirs=dir1,dir2,.... Default (single build/allure-results) unchanged for per-job runs.
  • build.gradlegenerateAllureEnvironment also writes an executor.json per job (name, type: github, buildName, buildUrl, buildOrder) so the Executors widget links back to each matrix job.
  • .github/workflows/step-ci-build.ymlmerge-test-reports now downloads each per-OS artifact into its own subdir (no merge-multiple) and passes them to allureReport via -PallureMergeDirs.

Net diff: +26 / -4 across two files.

What you'll see on the merged report after this PR

  • Environment widget: OS aggregates across launches; shared keys (GitCommit, ProjectVersion, CI) collapse to one entry.
  • Executors widget: one row per matrix cell, each linking back to its GitHub Actions job. Because jbang's matrix has many cells (Ubuntu × Java 8/11/17/21/25 for IT, plus unit + native-image), this widget will be longish but informative — labels include OS + Java version for disambiguation.
  • All per-test data preserved.

Verification

Locally simulated 3-OS merge: confirmed the embedded environment.json aggregates OS values and executors.json contains three executor entries. CI run on this PR will be the real check — open the Merged Allure Report link from the test-results-summary step summary.

How to verify on this PR

  1. Wait for the ci-build workflow to finish.
  2. Open the run's summary → "Merged Allure Report" link.
  3. Overview page should show:
    • Environment widget with multi-value entries for OS/Java/RUNNER_OS.
    • Executors widget with one row per matrix cell, links back to each job.

Background research

Allure 2's intended pattern for cross-host reports is "pass multiple dirs to allure generate". See Allure1EnvironmentPlugin (groups env keys across launches), ExecutorPlugin (one entry per launch dir), and AllureReport.kt in the gradle plugin (passes every rawResults entry as a separate CLI arg).

The merged Allure report previously showed only Windows metadata at the
top level. Per-OS test result JSON files were merged correctly (UUID-named,
no collision), but the fixed-name 'environment.properties' written by each
matrix job collided during 'download-artifact: merge-multiple: true' — the
last extracted file (Windows, alphabetically) won and overwrote the others.

Allure already supports the multi-launch pattern natively: pass multiple
results directories to 'allure generate' and the report aggregates the
Environment widget keys across launches and shows one row per launch in the
Executors widget. The only thing breaking that today was the flattening
download.

Changes:
- build.gradle: 'allureRawResultElements' is now configurable via the
  '-PallureMergeDirs=dir1,dir2,...' project property. The default (single
  'build/allure-results' dir) is unchanged for per-job runs.
- build.gradle: 'generateAllureEnvironment' also writes an 'executor.json'
  per job (name, type=github, buildName, buildUrl, buildOrder) so the
  Executors widget on the merged report links back to each matrix job.
- step-ci-build.yml: 'merge-test-reports' now downloads each per-OS
  artifact into its own subdir (no 'merge-multiple') and passes them to
  'allureReport' via '-PallureMergeDirs'.

Net result on the merged report:
- Environment widget: 'OS' aggregates across launches (e.g.
  'Linux amd64, Mac OS X aarch64, Windows 10 amd64'); shared keys
  ('GitCommit', 'ProjectVersion', 'CI') collapse to one entry.
- Executors widget: one row per matrix cell with link back to the job.
@coderabbitai

coderabbitai Bot commented May 30, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are limited based on label configuration.

🏷️ Required labels (at least one) (1)
  • ai-review

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: d1c09f3a-39e5-4123-96be-b8bf7a5d4c70

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

The merge-test-reports job had a duplicate-generation bug: my explicit
'gradle allureReport -PallureMergeDirs=...' step generated the report
correctly, then shared-test-archiving's own 'gradle allureReport --clean'
re-ran without the property, fell back to the non-existent
build/allure-results dir, and the --clean wiped the previously generated
report — leaving index.html upload to fail with 'No files were found'.

Fix: drop the explicit generate-report step and instead set
ORG_GRADLE_PROJECT_allureMergeDirs in $GITHUB_ENV before the archiving
step. Gradle automatically reads ORG_GRADLE_PROJECT_* as -P properties,
so shared-test-archiving's internal allureReport picks up the multi-dir
input on its only invocation.

Also: explicit empty suffix on the archiving call (was '${{ matrix.os }}'
which evaluates to empty in this non-matrix job — clearer this way).
@maxandersen
maxandersen merged commit 3e3dd18 into main May 30, 2026
30 checks passed
@maxandersen
maxandersen deleted the ci/allure-merge-multi-os branch May 30, 2026 22:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant