From 28c01eea282419b091e8ecfcb1e6e4d475f70736 Mon Sep 17 00:00:00 2001 From: Andrea Restello Date: Wed, 16 Sep 2026 16:49:14 +0200 Subject: [PATCH] Document how to run the CI checks locally Contributors had no way to reproduce the new CI gate without reading the workflow YAML. Spell out the metadata validation, the init-script lint, and the build + smoke test, plus the rule that config.yaml version must match the newest CHANGELOG heading. --- README.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/README.md b/README.md index 362255d..17d70d6 100644 --- a/README.md +++ b/README.md @@ -147,6 +147,36 @@ Contributions are welcome! Please: 4. Push to the branch (`git push origin feature/your-feature`). 5. Open a pull request. +### Running the checks locally + +[`.github/workflows/ci.yml`](.github/workflows/ci.yml) validates the add-on +metadata, lints the init scripts, then builds and smoke-tests the image. Run the +same checks before opening a PR: + +```bash +# Add-on metadata: required keys, known arch values, options/schema and +# ports/description symmetry, version vs CHANGELOG, slug vs directory name +pip install pyyaml +python3 .github/scripts/validate_addon.py + +# Init scripts +bash -n cups/rootfs/etc/cont-init.d/* +shellcheck --severity=error -s bash cups/rootfs/etc/cont-init.d/* + +# Build and smoke test +docker build -t cups-addon:ci cups/ +.github/scripts/smoke_test.sh cups-addon:ci +``` + +The smoke test boots the image the way the Supervisor does and checks that cupsd +comes up, that the compiled filters (`rastertokpsl`, `raster2dymolw`/`m`) and +vendored PPDs are present, that avahi is advertising for AirPrint, that the +`cupsd.conf` access policy still covers the LAN ranges, and that a LAN client can +reach the web UI. + +Any change to `cups/config.yaml` must bump `version` to match the newest +`## [x.y.z]` heading in `CHANGELOG.md` — CI enforces this. + ## License This project is licensed under the MIT License.