77 branches : [maintenance/gramps60]
88
99env :
10- HEADLESS_IMAGE : ghcr.io/${{ github.repository }}/gramps-headless:gramps60
11- GTK_IMAGE : ghcr.io/${{ github.repository }}/gramps-gtk:gramps60
10+ CI_IMAGE : ghcr.io/${{ github.repository }}/gramps-ci:gramps60
1211
1312jobs :
1413 # -----------------------------------------------------------------
15- # Lint (headless container)
14+ # Lint (ci container)
1615 # -----------------------------------------------------------------
1716 lint :
1817 name : Lint
1918 runs-on : ubuntu-latest
2019 container :
21- image : ghcr.io/${{ github.repository }}/gramps-headless :gramps60
20+ image : ghcr.io/${{ github.repository }}/gramps-ci :gramps60
2221 steps :
2322 - uses : actions/checkout@v4
2423
@@ -60,13 +59,13 @@ jobs:
6059 exit $failed
6160
6261 # -----------------------------------------------------------------
63- # Compile check (headless container)
62+ # Compile check (ci container)
6463 # -----------------------------------------------------------------
6564 compile-check :
6665 name : Compile Check
6766 runs-on : ubuntu-latest
6867 container :
69- image : ghcr.io/${{ github.repository }}/gramps-headless :gramps60
68+ image : ghcr.io/${{ github.repository }}/gramps-ci :gramps60
7069 steps :
7170 - uses : actions/checkout@v4
7271
@@ -81,13 +80,13 @@ jobs:
8180 exit $failed
8281
8382 # -----------------------------------------------------------------
84- # Unit tests — Linux (headless container)
83+ # Unit tests — Linux (ci container)
8584 # -----------------------------------------------------------------
8685 unit-test-linux :
8786 name : Unit Tests (Linux)
8887 runs-on : ubuntu-latest
8988 container :
90- image : ghcr.io/${{ github.repository }}/gramps-headless :gramps60
89+ image : ghcr.io/${{ github.repository }}/gramps-ci :gramps60
9190 steps :
9291 - uses : actions/checkout@v4
9392
@@ -101,71 +100,69 @@ jobs:
101100 test_dirs="$test_dirs $d"
102101 fi
103102 done
104- for f in */test_*.py; do
105- if [ -f "$f" ]; then
106- test_dirs="$test_dirs $(dirname "$f")"
107- fi
108- done
109103 if [ -n "$test_dirs" ]; then
110104 echo "Running unit tests in: $test_dirs"
111105 python3 -m pytest $test_dirs -v --tb=short \
112106 --ignore-glob='**/test_integration*.py' \
107+ --ignore=Sqlite/tests/test_sqlite.py \
113108 -m 'not gui'
114109 else
115110 echo "No per-addon unit test files found"
116111 fi
117112
118113 # -----------------------------------------------------------------
119- # Unit tests — Windows (bare runner, pip install )
114+ # Unit tests — Windows (conda-forge: bundles PyGObject + GTK + Gramps )
120115 # -----------------------------------------------------------------
121116 unit-test-windows :
122117 name : Unit Tests (Windows)
123118 runs-on : windows-latest
119+ defaults :
120+ run :
121+ shell : bash -el {0}
124122 steps :
125123 - uses : actions/checkout@v4
126124
127- - name : Set up Python
128- uses : actions /setup-python@v5
125+ - name : Set up Miniforge
126+ uses : conda-incubator /setup-miniconda@v3
129127 with :
128+ miniforge-version : latest
130129 python-version : " 3.12"
130+ activate-environment : addons-ci
131+ channels : conda-forge
131132
132- - name : Install dependencies
133- run : pip install gramps orjson pytest dbf
133+ - name : Install Gramps + test deps
134+ run : mamba install -y " gramps>=6.0,<6.1" pygobject gtk3 orjson pytest dbf
134135
135136 - name : Run per-addon unit tests
136137 env :
137138 PYTHONPATH : .
138- shell : bash
139139 run : |
140140 test_dirs=""
141141 for d in */tests/; do
142142 if ls "$d"/test_*.py 1>/dev/null 2>&1; then
143143 test_dirs="$test_dirs $d"
144144 fi
145145 done
146- for f in */test_*.py; do
147- if [ -f "$f" ]; then
148- test_dirs="$test_dirs $(dirname "$f")"
149- fi
150- done
151146 if [ -n "$test_dirs" ]; then
152147 echo "Running unit tests in: $test_dirs"
153148 python -m pytest $test_dirs -v --tb=short \
154149 --ignore-glob='**/test_integration*.py' \
150+ --ignore=Sqlite/tests/test_sqlite.py \
155151 -m 'not gui'
156152 else
157153 echo "No per-addon unit test files found"
158154 fi
159155
160156 # -----------------------------------------------------------------
161- # Integration tests — Gramps (GTK container)
157+ # Integration tests — Gramps (ci container, xvfb available )
162158 # -----------------------------------------------------------------
163159 integration-test :
164160 name : Integration Tests (Gramps)
165161 runs-on : ubuntu-latest
166162 needs : [unit-test-linux]
167163 container :
168- image : ghcr.io/${{ github.repository }}/gramps-gtk:gramps60
164+ image : ghcr.io/${{ github.repository }}/gramps-ci:gramps60
165+ options : --init
169166 steps :
170167 - uses : actions/checkout@v4
171168 with :
@@ -174,7 +171,7 @@ jobs:
174171 - name : Run plugin registration tests
175172 env :
176173 PYTHONPATH : .
177- run : xvfb-run python3 -m pytest tests/ -v --tb=short
174+ run : python3 -m pytest tests/ -v --tb=short
178175
179176 - name : Run per-addon integration tests
180177 env :
@@ -188,19 +185,19 @@ jobs:
188185 done
189186 if [ -n "$integration_tests" ]; then
190187 echo "Running per-addon integration tests: $integration_tests"
191- xvfb-run python3 -m pytest $integration_tests -v --tb=short
188+ python3 -m pytest $integration_tests -v --tb=short
192189 else
193190 echo "No per-addon integration test files found"
194191 fi
195192
196193 # -----------------------------------------------------------------
197- # Build (headless container — has intltool/gettext )
194+ # Build (ci container)
198195 # -----------------------------------------------------------------
199196 build :
200197 name : Build
201198 runs-on : ubuntu-latest
202199 container :
203- image : ghcr.io/${{ github.repository }}/gramps-headless :gramps60
200+ image : ghcr.io/${{ github.repository }}/gramps-ci :gramps60
204201 steps :
205202 - uses : actions/checkout@v4
206203
0 commit comments