ci: add headless smoke + screenshot test for the bar

Launch the real Waybar binary inside a headless, software-rendered sway
compositor and verify it actually runs and renders — something the unit
tests and build jobs never do.

- test/smoke/run.sh: boots sway (WLR_BACKENDS=headless, pixman), starts
  waybar, asserts it stays alive with no fatal log, optionally grabs a
  screenshot with grim
- level 1: real modules (clock/cpu/memory/disk) load without crashing
- level 2: deterministic config is screenshotted and checked to be non-blank
- level 3: screenshot compared to test/smoke/reference.png (fuzz 8%,
  800px tolerance); screenshot + diff uploaded as artifacts
- .github/workflows/smoke.yml runs it on push/PR

The reference image must be blessed from a CI artifact (see test/smoke/README.md).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Alex
2026-07-04 13:15:05 +02:00
co-authored by Claude Opus 4.8
parent d9f2a437d0
commit cf2f120ad7
6 changed files with 263 additions and 0 deletions
+27
View File
@@ -0,0 +1,27 @@
/* Deterministic stylesheet for the CI smoke/screenshot test.
* A pinned font (DejaVu Sans, installed in CI) and fixed colors keep the
* rendered bar reproducible across runs for the golden comparison. */
* {
font-family: "DejaVu Sans";
font-size: 14px;
border: none;
border-radius: 0;
min-height: 0;
}
window#waybar {
background-color: #1e1e2e;
color: #cdd6f4;
}
#custom-left,
#custom-center,
#custom-right {
padding: 0 16px;
color: #cdd6f4;
}
#custom-left {
font-weight: bold;
color: #89b4fa;
}