Skip to content

Run the tests on GitHub Actions, and rewrite the README - #9

Merged
DNAPrototypeX merged 4 commits into
mainfrom
ci-and-readme
Sep 3, 2026
Merged

DNAPrototypeX merged 4 commits into
mainfrom
ci-and-readme

Conversation

@DNAPrototypeX

Copy link
Copy Markdown
Owner

What changes

  • .github/workflows/ci.yml checks the format, runs clippy, and runs the tests on every push to main and on every pull request.
  • The README puts the installation first, shows the comparison picture at the top, and drops the milestone 3 preview section.

Why an Arch Linux container

Ubuntu 24.04 has gtk4-layer-shell 1.0, and PSLDM needs 1.3. The container also installs clang, because pam-sys builds its bindings with libclang. Xvfb gives the pixel test a display, and GSK_RENDERER=cairo draws without a graphics card.

Two fixes to the pixel test

  • Without a display the test printed a reason and passed. It now fails when PSLDM_REQUIRE_DISPLAY is set, so a skipped test cannot look like a pass.
  • The clock ticked between the two drawings. The test failed once in the container at 16:55:00, with 1086 different pixels. LoginPane::freeze_clock stops the clock and shows one fixed time in both panes.

Test

I ran the three job steps in an archlinux:latest container: the format check, clippy with -D warnings, and 9 unit tests plus the pixel test. All pass. The pixel test also ran 45 times over four minutes, across several minute boundaries, with no failure.

🤖 Generated with Claude Code

https://claude.ai/code/session_011A9rzXDGZ66ZnKyZBz8K3H

DNAPrototypeX and others added 4 commits September 3, 2026 13:06
Add .github/workflows/ci.yml. The job checks the format, runs clippy, and
runs the tests on every push to main and on every pull request.

The job runs in an Arch Linux container. Ubuntu 24.04 has gtk4-layer-shell
1.0, and PSLDM needs 1.3. The container also gets clang, because pam-sys
builds its bindings with libclang. Xvfb gives the pixel test a display, and
GSK_RENDERER=cairo draws without a graphics card.

Two changes make the pixel test fit for a job that nobody watches:

- Without a display the test printed a reason and passed. It now fails when
  PSLDM_REQUIRE_DISPLAY is set, so a skipped test cannot look like a pass.
- The clock ticked between the two drawings, and the test failed once in the
  container at 16:55:00. LoginPane::freeze_clock stops the clock and shows
  one fixed time in both panes. The test ran 45 times with no failure.

Also run cargo fmt over the workspace, so that the format check starts clean.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011A9rzXDGZ66ZnKyZBz8K3H
Rewrite the README around the two tasks that a reader has: install PSLDM,
and lock or log in with it. The comparison picture now stands at the top,
under one paragraph that says what PSLDM is.

Remove the section about the preview windows of milestone 3. The greeter
and the locker draw on their real surfaces now.

Add the CI badge, the clang dependency, and the versions that the two GTK
libraries need.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011A9rzXDGZ66ZnKyZBz8K3H
Add crates/psldm-ui/examples/comparison.rs. The example builds the greeter
and the locker, each one before and after the first key, and writes the four
panes as one PNG file. Run it under Xvfb to get the same picture on any
computer:

    xvfb-run -a -s "-screen 0 2560x1600x24" \
        cargo run -p psldm-ui --example comparison -- docs/comparison.png

Without a wallpaper file the example draws a gradient, so the repository
needs no photograph. docs/comparison.png comes from that command, and it
replaces the picture of the older layout.

Also take the personal parts out of the README:

- The lock section named SUPER + L and a Hyprland file path. It now says to
  bind the command in your own compositor, with the Hyprland file as one
  example.
- Remove the section about the two phases, and say in the first paragraph
  that the look follows macOS Sonoma.
- Remove the reason why the pixel test needs a display.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011A9rzXDGZ66ZnKyZBz8K3H
One pane in the picture is 1920 x 1200 now, and the whole file is 4070 x
2533. The pane draws the clock and the avatar at a fixed number of pixels,
so a small picture showed them larger than a user ever sees them.

The captions and the space around the panes grow with the panes.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011A9rzXDGZ66ZnKyZBz8K3H
@DNAPrototypeX
DNAPrototypeX merged commit 839653a into main Sep 3, 2026
1 check passed
@DNAPrototypeX
DNAPrototypeX deleted the ci-and-readme branch September 9, 2026 16:12
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