You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(ci): correctly report offline test results for non-vagrant builds
The shared-steps action runs an offline image test for every non-vagrant
build type (oci / gencloud / gencloud_ext4 / opennebula / azure /
hyperv): mount the image via qemu-nbd, grep the release string,
verify the rpm-reported architecture, and dump the installed packages
list. The step is unconditional - it does NOT gate on
`inputs.run_test` (per `if: ${{ ! contains(inputs.type, 'vagrant') }}`
on the step). Success of that step is recorded as
`got_pkgs_list=true`.
The summary + Mattermost report, however, were keyed on
`inputs.run_test`:
'Tests ${{ inputs.run_test == 'true' && 'passed ✅' || 'N/A ⚠️' }}'
so any non-vagrant build dispatched with `run_test=false` falsely
reported `Tests N/A ⚠️` even when the offline test actually ran and
passed (e.g. https://github.com/AlmaLinux/cloud-images/actions/runs/26090961842).
Fix: add a `Compute test status string` step (id: `test_status`) that
picks the right label from three env vars - `IS_VAGRANT`, `RUN_TEST`,
`GOT_PKGS_LIST` - and exposes it through `$GITHUB_OUTPUT`. Both the
github-script summary block and the Mattermost echo now reference
`${{ steps.test_status.outputs.test_status }}`, so the label is
computed once and used in both places.
The five label outcomes:
- Non-vagrant + got_pkgs_list=true -> `Tests (offline) passed ✅`
- Non-vagrant + got_pkgs_list=false -> `Tests (offline) failed ❌`
- Vagrant + run_test=true + got_pkgs_list=true -> `Tests passed ✅`
- Vagrant + run_test=true + got_pkgs_list=false -> `Tests failed ❌`
- Vagrant + run_test=false -> `Tests N/A ⚠️`
`inputs.run_test` no longer affects the non-vagrant branch - the
offline test runs regardless, so `got_pkgs_list` is the only signal
that matters. The `(offline)` qualifier disambiguates from the
real-`vagrant up` smoke test that the vagrant build path runs.
0 commit comments