Skip to content

Run the lint, the suite and the build on every push - #65

Closed
shubshub wants to merge 3 commits into
cq60/phase-4-versionfrom
cq60/phase-5-ci
Closed

shubshub wants to merge 3 commits into
cq60/phase-4-versionfrom
cq60/phase-5-ci

Conversation

@shubshub

@shubshub shubshub commented Sep 4, 2026

Copy link
Copy Markdown
Owner

Phase 5 of 5 for #60. Stacked on #64; merge that first.

What

.github/workflows/ci.yml: one job on ubuntu-24.04, on push and pull request, permissions: contents: read. Steps: checkout; apt-get install of the GTK/GI runtime plus xvfb, desktop-file-utils and three schema packages; pipx run --spec ruff==0.16.6 ruff check src tests; xvfb-run -a python3 tests/run.py; ./build.sh.

Why the schema packages: the suites read real GSettings schemas rather than stubbing them. gnome-settings-daemon-common owns org.gnome.settings-daemon.plugins.media-keys and gnome-shell-common owns org.gnome.shell.keybindings (both looked up by test_hotkey.py, which runs under GSETTINGS_BACKEND=memory); gsettings-desktop-schemas owns org.gnome.desktop.sound (test_sound.py). Confirmed with dpkg -S on a noble desktop.

Deliberately no actions/setup-python: the suites import gi, which belongs to the system python3 that python3-gi installs into.

Closes item 5 of #60. Closes #60.

Verification

  • Xvfb is not installed on the development machine, so the suite was run against a bare nested X server (Xephyr) with no window manager and no session daemons, and then again with DBUS_SESSION_BUS_ADDRESS, XDG_* and WAYLAND_DISPLAY unset: 24 suites, 0 failures both times. No suite needed a skip, and none was added.
  • The YAML parses (PyYAML).
  • The real acceptance is this PR's own Actions run; see the checks below.

Departures from the issue text

  • pipx run --spec ruff==0.16.6 rather than pip install ruff: pip install --user on the noble runner hits PEP 668. Pinned so an unrelated PR cannot go red because a new ruff release added a rule. Bump this pin together with the local ruff.
  • permissions: contents: read added; the default token grant is wider than a lint-and-build job needs.

@shubshub

shubshub commented Sep 4, 2026

Copy link
Copy Markdown
Owner Author

First Actions run on this branch: dependencies installed, lint passed, and under Xvfb 23 of 24 suites passed, including test_hotkey.py, test_notifications.py and the schema lookups. The one failure was test_sound.py, "a player was chosen": the runner has none of canberra-gtk-play, paplay, pw-play or aplay.

a472269 adds alsa-utils (which the package already recommends) to the apt line, so the suite keeps checking a real machine rather than learning to skip. The checks on this PR now reflect that commit.

@shubshub
shubshub force-pushed the cq60/phase-4-version branch from 778add8 to ea0d604 Compare September 4, 2026 11:17
shubshub and others added 3 commits September 4, 2026 23:17
…needed (#68)

It was written in five: build.sh, cli.py, the .TH line of the man page, two
filenames in the README, and the top of the changelog. build.sh now reads it
out of cli.py and substitutes it into the man page the way it already
substitutes packaging/control, the README names no version at all and points
at the Releases page instead, and release.sh reads cli.py too. That leaves
two: the program, and the changelog entry build.sh already refuses to build
without.

release.sh step 3 keeps only the changelog check -- the man page and README
have nothing left to disagree with -- and step 6 gains one on the built .TH
line, since that is generated now rather than written.

Also removes the blank line left in cli.load_input's docstring where the
ponytail paragraph was.

Closes 4.

Phase 4 of #60.

Co-authored-by: Shubshub <>
One job on ubuntu-24.04: ruff over src and tests, the 24 suites under xvfb,
then ./build.sh to prove the package still assembles.

Three of the apt packages are there for GSettings, because the suites look up
real schemas rather than stubbing them: gnome-settings-daemon-common owns
org.gnome.settings-daemon.plugins.media-keys and gnome-shell-common owns
org.gnome.shell.keybindings, both of which the hotkey suite reads, and
gsettings-desktop-schemas owns org.gnome.desktop.sound, which the sound suite
reads. xvfb is there because every drawing test wants a display, even though
none of them ever maps a window.

No actions/setup-python: gi belongs to the system python3 that python3-gi
installs into, and a second interpreter cannot see it.

Closes 5.

Phase 5 of #60.
The first run on GitHub Actions passed the lint and 23 of the 24 suites
under Xvfb -- the hotkey, notification and schema lookups all held up --
and failed only test_sound.py, at "a player was chosen": sound.player_command
found none of canberra-gtk-play, paplay, pw-play or aplay on the runner.
The package recommends alsa-utils, so the runner gets it too, rather than
the suite learning to look the other way.

Phase 5 of #60, follow-up.
@shubshub

shubshub commented Sep 4, 2026

Copy link
Copy Markdown
Owner Author

Closed by GitHub when its base branch went away. Superseded by #69, same commit rebased onto main.

@shubshub
shubshub deleted the branch cq60/phase-4-version September 4, 2026 11:18
@shubshub shubshub closed this Sep 4, 2026
@shubshub
shubshub deleted the cq60/phase-5-ci branch September 4, 2026 11:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant