Run the tests on GitHub Actions, and rewrite the README - #9
Merged
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes
.github/workflows/ci.ymlchecks the format, runs clippy, and runs the tests on every push tomainand on every pull request.Why an Arch Linux container
Ubuntu 24.04 has
gtk4-layer-shell1.0, and PSLDM needs 1.3. The container also installsclang, becausepam-sysbuilds its bindings with libclang. Xvfb gives the pixel test a display, andGSK_RENDERER=cairodraws without a graphics card.Two fixes to the pixel test
PSLDM_REQUIRE_DISPLAYis set, so a skipped test cannot look like a pass.LoginPane::freeze_clockstops the clock and shows one fixed time in both panes.Test
I ran the three job steps in an
archlinux:latestcontainer: 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