Consolidate CI images and fix Windows + integration tests - #2
Merged
Conversation
- Merge gramps-headless and gramps-gtk into one gramps-ci image. GTK typelibs live in the base so addon modules that do `from gi.repository import Gtk` at load time are importable; xvfb/xauth are bundled for tests that actually render. - Windows unit tests switch to conda-incubator/setup-miniconda and install pygobject, gtk3, and gramps from conda-forge. Pip alone can't install PyGObject on Windows without a bundled GTK runtime. - Integration-test container gets `options: --init` so xvfb-run doesn't hang waiting for SIGUSR1 when it runs as PID 1. - Narrow unit-test discovery to `*/tests/` only (drops DynamicWeb's nose-based root-level test that violates the convention) and explicitly ignore Sqlite/tests/test_sqlite.py which reads GRAMPS_RESOURCES at module import. - Add debug.log to .gitignore to prevent accidental re-commits. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
eduralph
added a commit
that referenced
this pull request
Jul 9, 2026
Addresses a second-pass adversarial review whose theme was that advisory buckets can hide real defects, plus a clearer failure message. Failure message (test_load_all_addon_modules): on failure, lead with only the real load failures (each with its error), then one plain-language line per advisory category explaining the cause and the fix. The full advisory lists stay in the warning log instead of burying the actionable failures under a wall of text. #1 Environment classifier is now specific and anchored. Dropped the over-broad signatures ("DISPLAY", bare "load_icon") that could match a genuine addon exception; kept anchored ones ("Gtk couldn't be initialized", "gtk-icon-theme-error-quark", the NoneType-load_icon phrase, missing-namespace) and only match them on a real error line, not an indented traceback frame or echoed source. Added TestEnvLoadClassifier with positive and negative cases. #2 A real import hang no longer passes as advisory. The isolated-load subprocess prints REGISTRY_READY after registration; on timeout, if the marker was emitted the addon's own import hung -> hard failure, otherwise the registry scan was slow -> advisory. (subprocess.TimeoutExpired captures partial stdout, so this needs no signals and works cross-platform.) #4 Opt-in strict mode for the depends_on load test. Environmentally inconclusive dependents stay advisory by default (headless local runs legitimately can't import GUI addons); setting GRAMPS_ADDON_TEST_STRICT=1 in a CI job with a full runtime promotes any unverified dependent to a failure. The i18n finding was again out of scope: test_i18n_extraction.py is pre-existing on maintenance/gramps60, not part of this PR. Verified against Gramps 6.0.8: classifier unit tests pass, the headless load test still passes with ClipboardGramplet kept advisory, hang-vs-slow-scan and strict-mode gating behave as intended. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
gramps-headlessandgramps-gtkimages into a singlegramps-ciimage. GTK typelibs live in the base (so addon modules that dofrom gi.repository import Gtkat module load are importable);xvfb/xauthare bundled for tests that actually render widgets.pip install gramps(which can't pull PyGObject on Windows without a bundled GTK runtime) toconda-incubator/setup-miniconda+mamba install pygobject gtk3 grampsfrom conda-forge.options: --initsoxvfb-rundoesn't hang waiting for Xvfb'sSIGUSR1ready signal when it runs as PID 1.*/tests/only (drops DynamicWeb's nose-based root-level test that violates the convention) and explicitly ignoresSqlite/tests/test_sqlite.py, which readsGRAMPS_RESOURCESat module import time.debug.logto.gitignoreto prevent future accidental commits.Verification (local)
--initTest plan
Build Docker Imagesworkflow rebuildsgramps-ciafter mergeghcr.io/eduralph/addons-source/gramps-ci:gramps60)Unit Tests (Linux)— 185 tests passUnit Tests (Windows)— conda-forge install succeeds, tests runIntegration Tests (Gramps)— 6 tests pass (no morexvfb-runhang)gramps-headless/gramps-gtkpackages on GHCR can be deleted manually🤖 Generated with Claude Code