Skip to content

ci: run just check on pull requests - #412

Open
CrazyPandaP wants to merge 5 commits into
armada-os:mainfrom
CrazyPandaP:ci/run-just-check
Open

CrazyPandaP wants to merge 5 commits into
armada-os:mainfrom
CrazyPandaP:ci/run-just-check

Conversation

@CrazyPandaP

Copy link
Copy Markdown

Stacked on #410 — that PR's three test commits are included here, so this diff will shrink to the workflow file once it lands. I'll rebase it onto main as soon as #410 merges.

The 30 scripts under tests/ are only run by hand today: nothing in .github/workflows/ references tests/, just check or just lint. A change that breaks a test looks green until someone happens to run the suite locally — which is how the three drifts in #410 got in.

This adds a job that runs just check (the 30 scripts plus the Justfile formatting check) on every pull request and on pushes to main.

Facts that shaped it:

  • The suite needs bash, python3 and coreutils only — no device, no network, no container. node and podman appear in the scripts only inside strings and stubs.
  • It finishes in ~9 seconds on an ordinary x86_64 Ubuntu 24.04 box (measured: 8.76s).
  • just comes from extractions/setup-just rather than apt-get, because the Justfile's [group(...)] attributes need just >= 1.22 while Ubuntu 24.04's archive still ships 1.21 — apt-get install just fails with Unknown attribute 'group'.
  • just lint is deliberately not wired up here. Its recipe is find . -iname "*.sh" -exec shellcheck "{}" \;, and find does not propagate the exit status of -exec, so the recipe returns 0 no matter what shellcheck reports (it currently reports ~210 findings). Fixing that needs a decision on severity scope or a cleanup pass, so it belongs in its own change.
  • The runner is ubuntu-latest (x86_64) because that is where I verified the suite; the tests are arch-agnostic, so switching to ubuntu-24.04-arm for consistency with the other workflows is fine if you prefer.

Happy to adjust anything here — and if the tests are deliberately kept out of CI for a reason I have missed, I would rather know than guess.

@JPyke3 JPyke3 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love the implementation, happy to add it. I'm just always cautious about over commenting code.

If we could have a quick fix up there I'd appreciate it

Comment thread tests/controller-profile-test.sh Outdated
@CrazyPandaP

Copy link
Copy Markdown
Author

Applied — the comment is two lines now:

# Controller targets come from per-device ARMADA_IP_TARGETS and are
# filtered against the types supported by controller-type.

I put the change on the tests branch so both PRs carry the trimmed version, then rebased this one on top. just check passes on the result: 30/30 scripts plus the Justfile format check.

@JPyke3
JPyke3 self-requested a review September 12, 2026 12:50
The vendored InputPlumber profiles were dropped for the upstream ones in
de2d5fb ("feat(input): drop upstreamed controllers"), and the
ARMADA_PROFILE_NAMES set went with them. The test kept looking for that
assignment, so it has failed on every run since.

What the controller UI offers now comes from the per-device quirks:
defaults.conf sets ARMADA_IP_TARGETS, a device may override it, device-env
publishes the value, and controller-type filters it against CONTROLLER_TYPES.
Check that contract instead, and keep the profile-name and passthrough
checks unchanged.
be8b568 ("feat(gamescope): DRM leasing preemption") added the flag to
armada-run-bottom without updating the expected argument list, so the test
has failed since that commit.
05ccd27 ("fix(armada-control): restore default scheduler behavior") changed
game-tweaks.json's scheduler from "eevdf" to null, which means "leave the
system default alone". Two checks still expected the old value.
7490047 ("feat(store): Add BigPEmu, MAME, PrimeHack and Ymir") added the
BigPEmu find rule but not this assertion, which pins exactly that set. Same
drift as the other three tests here — nothing runs them automatically.
The 30 scripts under tests/ are only run by hand today: no workflow
references tests/, just check or just lint, so a change that breaks a test
looks green until someone runs the suite locally. Three scripts were in
exactly that state when this was written (see armada-os#410).

The suite needs bash, python3 and coreutils only — no device, no network and
no container — and finishes in under ten seconds, so it runs on every pull
request and on pushes to main.

just comes from setup-just rather than apt because the Justfile's
[group(...)] attributes need just >= 1.22 while Ubuntu 24.04's archive still
ships 1.21.

just lint is deliberately not wired up here: its recipe runs shellcheck
through find -exec, which does not propagate the exit status, so the recipe
cannot fail as written. That is worth its own change.
@CrazyPandaP

Copy link
Copy Markdown
Author

Applied, and the check running once turned out to be useful — it surfaced two things, both now fixed:

rg: command not found. armada-control-rgb-test.sh uses ! rg -q ARMADA_RGB_ … to assert those variables are gone from the device configs. On a runner without ripgrep, rg exits 127, ! turns that into success, and the assertion passes vacuously. The job now installs ripgrep, and I checked that both assertions really pass once it is there.

armada-store-test.sh — a fourth case of the same drift. The job failed on assert names == {"ARMSX2", "CEMU", "PICO-8_64", "VITA3K", "XENIAEDGE"}: 7490047 ("feat(store): Add BigPEmu, MAME, PrimeHack and Ymir") added the BigPEmu ES-DE find rule but not the assertion that pins that set. That fix is on the tests PR (#410), which is now rebased onto current main.

Both branches are rebased onto current main (behind_by: 0). just check passes locally with ripgrep installed: 30/30 scripts plus the Justfile format check. Would you mind approving the workflow run again when you get a chance?

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.

2 participants