# Development [← kernelwatch](../README.md) ```sh make test # unit + integration tests (stdlib unittest) make lint # shellcheck, if available ``` Gitea Actions (`.gitea/workflows/ci.yml`) runs both on every push to `main` and every pull request: the tests on Python 3.10–3.13 (the versions on the supported Ubuntu and Debian releases) and shellcheck on the shell scripts. The tests run a real server on an ephemeral port. They also run the real agent script against stubbed `dpkg-query`/`apt-get`/`needrestart`/`uname` and a fake filesystem root (`KERNELWATCH_ROOT`), including one end-to-end agent → server report. Both installers (`agent/install.sh`, `server/install.sh`) run for real in the tests against a fake root: `KERNELWATCH_ROOT` prefixes every path they write and skips their root check, and `systemctl`, `apt-get`, `useradd` and the like are stubs that log their arguments. Don't set it on a real host. Run a local server against a scratch database: ```sh printf 'db_path = "/tmp/kw.db"\nsecure_cookies = false\n' > /tmp/kw.toml export KERNELWATCH_CONFIG=/tmp/kw.toml ./server/kernelwatch-server set-password admin ./server/kernelwatch-server serve # http://127.0.0.1:8080 ``` ## Ideas for later - Additional notification channels - A JSON endpoint for scripting - Grouping or tagging hosts (prod/staging, location)