Commit Graph

32 Commits

Author SHA1 Message Date
Kevin Veen-Birkenbach
f86f84ff93 Added missing constraints.txt
Some checks failed
ci / tests (push) Has been cancelled
2025-12-23 21:54:55 +01:00
Kevin Veen-Birkenbach
b429644d9e Relax Playwright dependency for Nix, pin exact version in Docker
Some checks failed
ci / tests (push) Has been cancelled
- Allow playwright>=1.46.0,<2 in pyproject.toml for Nix compatibility
- Add pip constraints.txt to pin playwright==1.46.0 in container builds
- Enforce constraints during Docker image build

https://chatgpt.com/share/694b0180-2734-800f-830e-44e15d0a527d
2025-12-23 21:54:16 +01:00
Kevin Veen-Birkenbach
9fbdce2972 Solved
Some checks failed
ci / tests (push) Has been cancelled
Error: Invalid installation targets: 'chromium-headless-shell'. Expecting one of: chromium, chrome, chrome-beta, msedge, msedge-beta, msedge-dev, firefox, webkit
make: *** [Makefile:86: playwright-install] Error 1
2025-12-23 21:38:27 +01:00
Kevin Veen-Birkenbach
1b3ee2c3fd fix: pin Playwright to 1.46.0 to match Docker base image
Some checks failed
ci / tests (push) Has been cancelled
The Docker image is based on mcr.microsoft.com/playwright/python:v1.46.0.
Using an open-ended dependency (playwright>=1.46.0) allowed newer
Playwright versions to be installed in CI, causing driver/browser
mismatches and bootstrap crashes (exit code 3).

Pinning Playwright to 1.46.0 ensures version consistency between
Python package and container image and fixes the docker-compose
E2E stack failure.

https://chatgpt.com/share/694afaed-7c1c-800f-a2da-ec8c06e6ebe1
2025-12-23 21:26:03 +01:00
Kevin Veen-Birkenbach
1f448f4457 test(e2e): make root docker-compose stack port-configurable
Some checks failed
ci / tests (push) Has been cancelled
Parameterize Matomo’s published port via MATOMO_PORT to avoid CI collisions,
update installer site URL accordingly, and adapt the root docker-compose E2E
test to run on a non-default port with explicit environment injection.

https://chatgpt.com/share/694af650-a484-800f-ace7-0a634d57b0a0
2025-12-23 21:16:51 +01:00
Kevin Veen-Birkenbach
7fa8b580d2 test(e2e): validate root docker-compose stack bootstrap flow
Some checks failed
ci / tests (push) Has been cancelled
Adds an end-to-end test that brings up the root docker-compose.yml stack,
runs the one-shot bootstrap container, verifies token-only stdout, and
checks the token via Matomo API, with full cleanup via down -v.

https://chatgpt.com/share/694af650-a484-800f-ace7-0a634d57b0a0
2025-12-23 21:06:16 +01:00
Kevin Veen-Birkenbach
bf69c110a7 fix(nix): use nixpkgs playwright-driver and disable Playwright browser downloads
Some checks failed
ci / tests (push) Has been cancelled
https://chatgpt.com/share/694af26e-fb6c-800f-b0e3-e710cd035798
2025-12-23 20:49:57 +01:00
Kevin Veen-Birkenbach
a582e8be13 ci: split reusable workflow into lint + e2e jobs
Some checks failed
ci / tests (push) Has been cancelled
- Run ruff in a dedicated lint job (faster feedback)
- Keep e2e separate and install dependencies only there
- Force Playwright Chromium install to avoid cache-related missing binaries
- Trigger CI on PRs and pushes to main

https://chatgpt.com/share/694ae842-1588-800f-9418-31e7d02ac45e
2025-12-23 20:35:09 +01:00
Kevin Veen-Birkenbach
e38051a92f fix(playwright): install chromium-headless-shell for headless runs
Some checks failed
CI / test (push) Has been cancelled
Playwright v1.46 expects the separate chromium_headless_shell binary in
headless mode. Install chromium-headless-shell alongside chromium in both
the Makefile and Nix flake installer to prevent ENOENT launch errors.

https://chatgpt.com/share/694ae842-1588-800f-9418-31e7d02ac45e
2025-12-23 20:06:30 +01:00
Kevin Veen-Birkenbach
8162d337b5 nix: disable pythonImportsCheck to avoid Playwright side effects during build
Some checks failed
CI / test (push) Has been cancelled
https://chatgpt.com/share/694ae5ee-de04-800f-9944-9d7deb74f300
2025-12-23 19:56:42 +01:00
Kevin Veen-Birkenbach
bac453c435 ci: add GHCR publish workflow gated by tests
Some checks failed
CI / test (push) Has been cancelled
- build & push image on tag
- publish :latest only for semver tags
- multi-arch (amd64, arm64)

https://chatgpt.com/share/694ae4b0-ca28-800f-863c-0916a2f62a43
2025-12-23 19:51:10 +01:00
Kevin Veen-Birkenbach
a2010cd914 feat(container): add pinned Playwright Docker image and compose stack for Matomo bootstrap
Some checks failed
CI / test (push) Has been cancelled
- Add Dockerfile based on pinned Playwright image (v1.46.0-jammy) for reproducible browser runtime
- Introduce docker-compose stack (MariaDB + Matomo + one-shot bootstrap)
- Extend Makefile with container image and stack management targets
- Add env.sample for environment-driven bootstrap configuration
- Relax Playwright dependency to >=1.46.0 to keep Nix builds compatible
- Add E2E test ensuring docker-compose bootstrap exits with 0 and prints token
2025-12-23 19:41:31 +01:00
Kevin Veen-Birkenbach
f270a5c7c6 Release version 1.0.1
Some checks failed
CI / test (push) Has been cancelled
Stable Tag / test (push) Has been cancelled
Stable Tag / tag-stable (push) Has been cancelled
v1.0.1
2025-12-23 17:50:24 +01:00
Kevin Veen-Birkenbach
5e5b6c8933 fix(nix/e2e): keep Playwright install output off stdout
Some checks failed
CI / test (push) Has been cancelled
- Build matomo-bootstrap with setuptools/wheel in Nix
- Run playwright install via a dedicated pythonPlaywright env and redirect logs to stderr
- Add Nix-based E2E path: nix runner service + persistent nix/home volumes + host networking
- Add E2E test that runs bootstrap via `nix run` and asserts token-only stdout

https://chatgpt.com/share/694ab489-7028-800f-8398-a19a99faffd0
2025-12-23 17:44:41 +01:00
Kevin Veen-Birkenbach
1af480ee91 chore(nix): pin nixpkgs via flake.lock for reproducible runs
https://chatgpt.com/share/694ab489-7028-800f-8398-a19a99faffd0
2025-12-23 17:29:03 +01:00
Kevin Veen-Birkenbach
4f7de18a11 Release version 1.0.0
Some checks failed
CI / test (push) Has been cancelled
Stable Tag / test (push) Has been cancelled
Stable Tag / tag-stable (push) Has been cancelled
v1.0.0
2025-12-23 13:33:39 +01:00
Kevin Veen-Birkenbach
1a65077d0c Deactivated Mirror git.veen.world temporary due to db issues
Some checks failed
CI / test (push) Has been cancelled
2025-12-23 13:32:15 +01:00
Kevin Veen-Birkenbach
83967ab61f Added funding 2025-12-23 13:04:17 +01:00
Kevin Veen-Birkenbach
50914dea8b docs(readme): add installation and usage instructions for nix and python
Document how to install and use matomo-bootstrap via Nix flakes and pip,
describe CLI usage, environment variables, debug mode, E2E workflow,
and add author attribution.

https://chatgpt.com/share/694a84dd-aa30-800f-b45e-8a30e66e1c9b
2025-12-23 13:02:33 +01:00
Kevin Veen-Birkenbach
c9d4a5a9a4 feat(nix): expose matomo-bootstrap as flake package and app
- add flake packages and apps for matomo-bootstrap
- provide nix run support for CLI execution
- add Playwright browser installer app
- simplify devShell (remove pytest, keep ruff only)
- align pyproject license with MIT LICENSE
- register stable CLI entry point via project.scripts
2025-12-23 12:58:48 +01:00
Kevin Veen-Birkenbach
5f645cbfbf Changed License to MIT 2025-12-23 12:51:53 +01:00
Kevin Veen-Birkenbach
47dc84238f Added Mirrors 2025-12-23 12:50:17 +01:00
Kevin Veen-Birkenbach
d41129b6bd ci: deduplicate workflows using reusable test pipeline and stable tagging
- Introduce reusable-test workflow for Ruff + E2E tests
- Refactor CI to call reusable workflow (no duplicated steps)
- Add stable-tag workflow to promote version tags to stable after successful tests

https://chatgpt.com/share/694a7f81-d96c-800f-88cb-7b25b4cdfe1a
2025-12-23 12:46:30 +01:00
Kevin Veen-Birkenbach
482ac3377d ci: add GitHub Actions workflow with ruff and E2E tests
- Add CI workflow running Ruff lint/format checks
- Run full E2E cycle (Docker Compose + Playwright + tests)
- Refactor code formatting to satisfy Ruff (line breaks, readability)
- Use sys.executable in tests for interpreter-agnostic execution

https://chatgpt.com/share/694a7f81-d96c-800f-88cb-7b25b4cdfe1a
2025-12-23 12:39:39 +01:00
Kevin Veen-Birkenbach
5dbb1857c9 refactor: remove bootstrap wrappers and split into config/service/installers
- Replace bootstrap wrapper with config-driven service orchestration
- Introduce Config dataclass for centralized env/CLI validation
- Add MatomoApi service for session login + app token creation
- Move Playwright installer into installers/web and drop old install package
- Refactor HttpClient to unify HTTP handling and debug to stderr
- Make E2E tests use sys.executable instead of hardcoded python3
2025-12-23 12:33:42 +01:00
Kevin Veen-Birkenbach
92a2ee1d96 fix(cli): keep stdout clean by sending installer/auth logs to stderr
- route all installer and auth debug output to stderr
- ensure CLI stdout contains only the generated token
- fix E2E test failure caused by mixed log/token output

https://chatgpt.com/share/694a7b30-3dd4-800f-ba48-ae7083cfa4d8
2025-12-23 12:24:54 +01:00
Kevin Veen-Birkenbach
b63ea71902 fix(e2e): use Playwright web installer + session-based token creation for Matomo 5.3
- make Playwright a runtime dependency (installer requires it)
- record-and-replay Matomo web installer flow (more stable than container bootstrap)
- replace removed UsersManager.getTokenAuth with cookie-session login + createAppSpecificTokenAuth
- make HttpClient return (status, body) for HTTPError responses
- set deterministic container names in docker-compose and pass MATOMO_CONTAINER_NAME

https://chatgpt.com/share/694a7b30-3dd4-800f-ba48-ae7083cfa4d8
2025-12-23 12:21:13 +01:00
Kevin Veen-Birkenbach
da261e21e9 Removed src/matomo_bootstrap.egg 2025-12-23 11:37:55 +01:00
Kevin Veen-Birkenbach
65e26014e3 test(e2e): add venv + playwright deps and robust Matomo API auth flow
- Add optional dependency group "e2e" with Playwright in pyproject.toml
- Teach Makefile to create/use local .venv, install e2e deps, and fetch Chromium
- Wait for Matomo HTTP response (any status) before running bootstrap
- Switch API calls to /index.php and add HttpClient.get()
- Use UsersManager.getTokenAuth (md5Password) to obtain token_auth for privileged calls
- Make web installer more resilient to HTTPError/500 and locale/button variations
- Update E2E test to pass admin email and call API via /index.php

https://chatgpt.com/share/694a70b0-e520-800f-a3e4-eaf5e96530bd
2025-12-23 11:36:20 +01:00
Kevin Veen-Birkenbach
541eb04351 Initial draft 2025-12-23 11:14:24 +01:00
Kevin Veen-Birkenbach
042f16f44b Initial commit 2025-12-23 10:20:09 +01:00
Kevin Veen-Birkenbach
1a3d89fea5 Initial commit 2025-12-23 10:19:37 +01:00