Upgrade test: started by hand only, and two checks that prove what they say

The workflow no longer runs for pull requests. It is started by hand,
and still posts to the pull request of the branch it was started on.
The fork fallback and the fork guard go with the trigger.

Two checks could pass without the thing they named being true:

The wallpaper check asked only whether the file the link points at
exists, so an update that swapped the user's picture for another would
pass. It now compares before and after: the same picture, whatever
format it is kept in, and present.

The failed-units check read an empty answer as nothing failed, which is
also what a service manager that cannot be asked gives. A query that
fails is now recorded as that, and fails the check.
This commit is contained in:
Emir Beganovic committed 2026-10-10 00:09:56 +02:00
1 parent 7f0ae48661
commit b5936a6cbe
3 files changed
+20 -21

No files matched your search

+7 -16
View File
@@ -5,8 +5,7 @@ name: Upgrade test
# checks what came back. test/upgrade-test does the work and says what it
# checks.
#
# Started by hand: from the latest release to edge unless told otherwise. It
# also runs for a pull request that changes the test itself.
# Started by hand only: from the latest release to edge unless told otherwise.
#
# When there is a pull request for the branch it ran on, the result goes there
# as one comment, updated in place on later runs, with a picture of the desktop
@@ -25,16 +24,12 @@ on:
description: "Release to start from, like 4.0.4 (default: the latest)"
type: string
default: ""
pull_request:
paths:
- test/upgrade-test
- .github/workflows/upgrade-test.yml
permissions:
contents: read
concurrency:
group: upgrade-test-${{ github.event.pull_request.number || github.ref }}
group: upgrade-test-${{ github.ref }}
cancel-in-progress: true
env:
@@ -43,9 +38,7 @@ env:
jobs:
upgrade:
name: Install, upgrade, reboot
# Our own branches run on Namespace; a pull request from a fork stays on
# GitHub's runner.
runs-on: ${{ github.event.pull_request.head.repo.fork && 'ubuntu-26.04' || 'namespace-profile-linux-amd64-16x32' }}
runs-on: namespace-profile-linux-amd64-16x32
timeout-minutes: 60
outputs:
from: ${{ steps.release.outputs.version }}
@@ -134,7 +127,7 @@ jobs:
report:
name: Report
needs: upgrade
if: ${{ !cancelled() && !github.event.pull_request.head.repo.fork }}
if: ${{ !cancelled() }}
runs-on: ubuntu-26.04
timeout-minutes: 10
permissions:
@@ -143,8 +136,7 @@ jobs:
env:
GH_TOKEN: ${{ github.token }}
FROM: ${{ needs.upgrade.outputs.from }}
PR: ${{ github.event.pull_request.number }}
BRANCH: ${{ github.head_ref || github.ref_name }}
BRANCH: ${{ github.ref_name }}
SHOTS_BRANCH: upgrade-test-screenshots
steps:
# No evidence at all still gets a comment saying so.
@@ -212,9 +204,8 @@ jobs:
} >comment.md
cat comment.md >>"$GITHUB_STEP_SUMMARY"
# A run started by hand has no pull request of its own: use the open
# one for its branch, if there is one.
pr=${PR:-$(gh pr list -R "$GITHUB_REPOSITORY" --head "$BRANCH" --state open --json number --jq '.[0].number // empty')}
# The open pull request for the branch this was started on, if any.
pr=$(gh pr list -R "$GITHUB_REPOSITORY" --head "$BRANCH" --state open --json number --jq '.[0].number // empty')
[ -n "$pr" ] || { echo "No pull request for $BRANCH: the result is on this run's page."; exit 0; }
existing=$(gh api "repos/$GITHUB_REPOSITORY/issues/$pr/comments" --paginate \
--jq "[.[] | select(.user.login == \"github-actions[bot]\" and (.body | startswith(\"$marker\")))][0].id // empty")
+1 -1
View File
@@ -280,7 +280,7 @@ The "Upgrade test" workflow does both steps from a release's ISO. Start it by ha
gh workflow run upgrade-test.yml -f to=edge
```
When the branch it ran on has a pull request, the result is posted there as one comment and updated in place on later runs.
It only runs when started. When the branch it ran on has a pull request, the result is posted there as one comment and updated in place on later runs.
## Signing the ISO
+12 -4
View File
@@ -101,8 +101,11 @@ facts() { # file
echo "systemd=$(systemctl --version | sed -n "1s/^systemd \([0-9.]*\).*/\1/p")"
echo "hyprland=$(pacman -Q hyprland 2>/dev/null | cut -d" " -f2)"
echo "system_state=$(systemctl is-system-running 2>/dev/null)"
echo "failed_units=$(systemctl --failed --no-legend --plain | awk "{print \$1}" | paste -sd, -)"
echo "failed_user_units=$(systemctl --user --failed --no-legend --plain | awk "{print \$1}" | paste -sd, -)"
# A manager that cannot be asked is not a manager with nothing failed.
units=$(systemctl --failed --no-legend --plain 2>/dev/null) && units=$(awk "{print \$1}" <<<"$units" | paste -sd, -) || units="could not ask systemd"
user_units=$(systemctl --user --failed --no-legend --plain 2>/dev/null) && user_units=$(awk "{print \$1}" <<<"$user_units" | paste -sd, -) || user_units="could not ask the user manager"
echo "failed_units=$units"
echo "failed_user_units=$user_units"
echo "hyprland_running=$(pgrep -c -x Hyprland)"
echo "migrations_run=$(find ~/.local/state/omarchy/migrations -maxdepth 1 -name "*.sh" | wc -l)"
echo "migrations_skipped=$(find ~/.local/state/omarchy/migrations/skipped -name "*.sh" 2>/dev/null | wc -l)"
@@ -192,9 +195,14 @@ check "It is on the $channel channel (got: $(a channel))" test "$(a channel)" =
check "The running kernel is an installed one ($(a kernel))" test "$(a kernel_is_installed)" = yes
check "systemd reports the system running (got: $(a system_state))" test "$(a system_state)" = running
failed="$(a failed_units) $(a failed_user_units)"
check "No failed units (${failed// /}${failed:+ })" test -z "${failed// /}"
failed=$(xargs <<<"$failed")
check "No failed units (${failed:-none})" test -z "$failed"
check "The desktop is up (Hyprland processes: $(a hyprland_running))" test "$(a hyprland_running)" = 1
check "The wallpaper the user had still exists ($(a wallpaper))" test "$(a wallpaper_exists)" = yes
# The same picture, whatever format it is kept in now: an update may convert
# the bundled images, and may not swap the one the user chose for another.
before_wallpaper=$(b wallpaper) after_wallpaper=$(a wallpaper)
check "The wallpaper is the one the user had, and exists ($before_wallpaper → $after_wallpaper)" \
test "$(a wallpaper_exists)" = yes -a -n "$after_wallpaper" -a "${after_wallpaper%.*}" = "${before_wallpaper%.*}"
check "The boot menu has one Omarchy group ($(a boot_entry_groups))" test "$(a boot_entry_groups)" = 1
row() { printf '| %s | %s | %s |\n' "$1" "$(b "$2")" "$(a "$2")"; }