From f563baf2372e6c6089bcf6bbed552376d6487892 Mon Sep 17 00:00:00 2001 From: Defame1297 Date: Sat, 14 Nov 2026 13:59:45 +0000 Subject: [PATCH] ci(images): smoke-test the ruff and shellcheck hooks in the ci image The image build ran only yamllint, gitleaks and actionlint on a staged sample, and a hook with no matching file is skipped, so a missing ruff or shellcheck-py environment would not have failed the build. Stage a .py and a .sh sample and run ruff-check, ruff-format and shellcheck too (#112). Part of the unpublished ci 0.2.16, so no further version bump. Co-Authored-By: Claude Sonnet 5.5 Claude-Session: https://claude.ai/code/session_014uGZTNmHMc85bomfevwUDG --- images/ci/Dockerfile | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/images/ci/Dockerfile b/images/ci/Dockerfile index 480da20..6b178b1 100644 --- a/images/ci/Dockerfile +++ b/images/ci/Dockerfile @@ -82,7 +82,7 @@ RUN python3 -m venv /opt/uv-venv \ # downloads into /.go, about 170 MB per environment, which alone pushed the # /opt/pre-commit layer past Cloudflare's 100 MB limit (413 on the first push). At run # time only the built binaries in /bin run, so the toolchains and the Go build -# cache are deleted. The three hooks run on a staged sample before and after the +# cache are deleted. The hooks below run on a staged sample before and after the # deletion: a cache that is incomplete (a missing environment would be rebuilt, which # needs the network) or no longer works fails the image build, not the jobs. RUN set -eu; \ @@ -93,10 +93,12 @@ RUN set -eu; \ /opt/venv/bin/pre-commit install-hooks; \ mkdir -p .gitea/workflows; \ printf -- '---\nkey: value\n' > ok.yaml; \ + printf -- 'print("ok")\n' > ok.py; \ + printf -- '#!/bin/sh\necho ok\n' > ok.sh; \ printf -- '---\nself-hosted-runner:\n labels:\n - kamino-docker\n' > .gitea/actionlint.yaml; \ printf -- '---\n"on": push\njobs:\n t:\n runs-on: kamino-docker\n steps:\n - run: echo ok\n' > .gitea/workflows/t.yml; \ - git add ok.yaml .gitea/actionlint.yaml .gitea/workflows/t.yml; \ - smoke() { for h in yamllint gitleaks actionlint; do /opt/venv/bin/pre-commit run "$h" --all-files; done; }; \ + git add ok.yaml ok.py ok.sh .gitea/actionlint.yaml .gitea/workflows/t.yml; \ + smoke() { for h in yamllint gitleaks actionlint ruff-check ruff-format shellcheck; do /opt/venv/bin/pre-commit run "$h" --all-files; done; }; \ smoke; \ rm -rf /opt/pre-commit/repo*/golangenv-*/.go /root/.cache/go-build; \ smoke; \