Commit Graph
8 Commits
Author SHA1 Message Date
willemjan bd66d3dacd Fix CI: downgrade artifact actions to v3 for Gitea Actions compatibility
CI/CD / test (push) Successful in 41s
CI/CD / sonarqube (push) Successful in 34s
CI/CD / build-and-scan (push) Successful in 1m56s
CI/CD / deploy (push) Successful in 17s
upload-artifact@v4/download-artifact@v4 use the newer Artifact API v2,
which Gitea's act_runner doesn't support yet (GHESNotSupportedError).
v3 uses the older, Gitea-compatible API.
2026-09-05 23:03:16 +02:00
willemjan 7f4377329a Add CI test-coverage gate at 80%, backfill remaining logic-module gaps
willemjan/glucose-dashboard/pipeline/head This commit looks good
pytest-cov + pyproject.toml [tool.coverage.*] measure reporting.py,
nightscout_client.py, data_processing.py, pdf_export.py, profile_data.py,
ui_common.py, and auth.py; app.py and pages/*.py are omitted (thin
Streamlit UI scripts, not meaningfully unit-testable without a running
Streamlit session — the handful of similarly UI-coupled functions left
in ui_common.py/auth.py are marked "# pragma: no cover" with the same
rationale, since the logic they call into is already fully tested).

The Gitea Actions test job now runs with --cov and fails the build
below 80%; the coverage XML is uploaded as a build artifact and fed
into the SonarQube scan (closing the gap flagged in
homelab-cicd-werkinstructie.md). Backfilled a few missing branches
(get_colors() theme fallback, secondary-y-axis overlay traces) to reach
98% on the measured modules — comfortable headroom above the 80% gate.

Builds on #29/#30/#31.
2026-09-05 22:52:29 +02:00
willemjanandClaude Sonnet 5 7379f6be8c pin trivy-action to the last docker-based release
@master resolves to a version that installs Trivy via a nested
setup-trivy composite action, which does an actions/checkout against
github.com with a token. On Gitea's act_runner that fails with "Input
required and not supplied: token" even when the token is explicitly
set to an empty string (act_runner doesn't distinguish empty from
unset). v0.26.0 introduced that composite/setup-trivy split; v0.25.0
is the last release that ships as a self-contained Docker image with
Trivy already baked in, so it needs no token at all.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
2026-07-26 14:54:43 +02:00
willemjanandClaude Sonnet 5 e0d6b79e68 use the working duckdns hostname for the registry, fix trivy github auth
gitea.zb.local resolves but is plain HTTP, which Docker refuses as a
registry without daemon-level insecure-registry config. gitea.zb.lan
resolves but nothing answers there yet (proxy not configured for it).
gitea.zb-kw.duckdns.org is confirmed reachable end-to-end over HTTPS,
including the registry v2 API, from both the runner and the deploy
target, so use that consistently. Also fix aquasecurity/trivy-action's
token-setup-trivy input, which defaults to gitea.token and gets
rejected by github.com when it tries to clone the install script.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
2026-07-25 22:02:53 +02:00
willemjan d6107515c0 updated sonarqube scan action version 2026-07-25 21:22:18 +02:00
willemjanandClaude Sonnet 5 e805dc9194 fix registry hostname and load .env automatically
gitea.thuis.local doesn't resolve on this network; the real internal
Gitea hostname is gitea.zb.local. Also load .env via python-dotenv so
the app works the same under PowerShell as bash, and add .dockerignore
so .env never ends up baked into the image.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
2026-07-25 09:29:43 +02:00
willemjan 60735de445 added getting data from nightscout 2026-07-25 08:54:08 +02:00
willemjan c02110a82b first commit 2026-07-24 07:49:59 +02:00