Skip to content

Lint shell, Python and Containerfiles on every PR - #15

Merged
BenA-SA merged 1 commit into
masterfrom
ci/add-lint-workflow
Sep 20, 2026
Merged

BenA-SA merged 1 commit into
masterfrom
ci/add-lint-workflow

Conversation

@BenA-SA

@BenA-SA BenA-SA commented Sep 20, 2026

Copy link
Copy Markdown
Owner

The repo had no CI at all — no workflows, no branch protection, allow_auto_merge off — so gh pr checks reported "no checks reported" on every branch and nothing verified a PR before merge.

What this adds

.github/workflows/lint.yml, three parallel jobs on every PR and on pushes to master:

Job Tool Scope
shellcheck runner's shellcheck, --severity=warning all 14 *.sh
ruff ruff==0.11.7 tools/
hadolint hadolint:v2.15.1-alpine Containerfile.*

Finishes in well under a minute.

Why not build the container

It would take tens of minutes per PR (stage 1 compiles qdomyos-zwift from source; stage 2 adds Wine, Mesa, DXVK, VKD3D and runs the TPV installer under Xvfb) — and it would cover almost none of the open diffs. #14 is pure Python plus docs; #8 is shell plus one line of Containerfile.full. It would also re-fetch and execute the proprietary TPV installer from public CI on every run.

A workflow_dispatch + scheduled real build is the intended follow-up, so breakage is caught on a timer instead of gating PRs.

The shell fixes

Four pre-existing shellcheck warnings, all false positives, fixed at source so the gate can sit at warning instead of the toothless error:

  • scripts/build-prefix.sh ×2 — SC2211, deliberate globs (version dir unknown until build time, both already have a || fallback) → # shellcheck disable=SC2211
  • tools/kernel-test-vm/*.sh ×3 — SC2034, unused counter in for i in $(seq 1 90) → for _

Reasoning in full: docs/adr/0007-lint-only-ci-not-a-container-build.md.

The repo had no CI, so nothing verified a PR before merge. A full
Containerfile build would take tens of minutes and still cover almost
none of the open diffs, so lint what the tree actually contains instead:
shellcheck, ruff and hadolint, in parallel, in under a minute.

Fixes the four pre-existing shellcheck warnings at source (two
intentional SC2211 globs, three SC2034 retry counters) so the shell gate
can sit at --severity=warning rather than the toothless error level.

See docs/adr/0007.
@BenA-SA
BenA-SA merged commit ddab90b into master Sep 20, 2026
4 checks passed
@BenA-SA
BenA-SA deleted the ci/add-lint-workflow branch September 20, 2026 08: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