Skip to content

ci: add lint and smoke checks on pull requests - #6

Merged
Sayt-0 merged 2 commits into
mainfrom
ci/checks
Sep 30, 2026
Merged

Sayt-0 merged 2 commits into
mainfrom
ci/checks

Conversation

@Sayt-0

@Sayt-0 Sayt-0 commented Sep 30, 2026

Copy link
Copy Markdown
Owner

Summary

main is deployed as-is by GitHub Pages and piped into bash, so every pull request is now checked before it can be merged. Two jobs, lint and smoke, run on each pull request and on pushes to main. The Contributing section of the README lists both scripts as a step before opening a PR.

Checks

lint (tests/lint.sh)

  • bash -n and ShellCheck (bash dialect, errors only) on every script, including extension-less ones like fake-gcc/gcc
  • each manifest entry has its confloose.sh and antidote.sh, each folder is listed in the manifest, no duplicates
  • a single fallback URL everywhere, identical to the install.sh default
  • no URL outside CONFLOOSE_BASE in confloose/
  • every file the scripts download exists in the repo

smoke (tests/smoke.sh)

  • serves the repo locally and checks the menu (listing, then apply and undo by number)
  • applies and undoes each confloose through install.sh in a throwaway HOME, then requires that HOME to match its initial state exactly (content and file modes)
  • the seeded HOME holds user config (.bashrc, i3 config, Alacritty config, a ~/.local/bin/gcc shim) that antidotes must leave intact
  • empty environment, no terminal, and stubs for i3-msg, xrandr, xinput, setxkbmap, xkill and i3lock, so it is also safe to run locally
  • covers 23 of the 26 confloose; daemon-terminal, i3loop and tchiki start a background daemon and are skipped

Workflow

  • permissions: contents: read, pull_request trigger (fork PRs get a read-only token and no secrets)
  • actions/checkout pinned by commit SHA (v7.0.1), credentials not persisted

Verification

Scenario Result
lint.sh on current main, ShellCheck 0.9.0 (runner version) and 0.11.0 pass
smoke.sh on current main pass, 23 confloose in about 4 s
antidote leaving a file behind (fake-git) fail, with the diff
antidote not restoring the backup (alacritty-color) fail, with the diff
confloose that changes nothing (sleep) fail
downloaded file missing (fake-git) fail
shared antidote base broken fail for the 12 confloose using it
diverging fallback URL, foreign URL, missing antidote, unlisted folder, syntax error, missing asset lint fail

After merge

lint and smoke can be added as required status checks in the Main ruleset; they become selectable once the workflow has run.

main is deployed as-is by GitHub Pages and piped into bash, so check
every pull request before it can be merged:

- tests/lint.sh: bash -n and ShellCheck (errors only) on every script,
  manifest consistency, a single fallback URL matching install.sh, no
  download outside CONFLOOSE_BASE, and every downloaded file present.
- tests/smoke.sh: serves the repo locally, checks the menu, then applies
  and undoes each confloose through install.sh in a throwaway HOME with
  the X11/i3 tools stubbed, and requires the HOME to be restored exactly.
  The three daemon confloose are skipped.

The Contributing section now lists both checks.
@Sayt-0
Sayt-0 merged commit 4bf4515 into main Sep 30, 2026
2 checks passed
@Sayt-0
Sayt-0 deleted the ci/checks branch September 30, 2026 13:13
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