Skip to content

Commit 3a2b80b

Browse files
phernandezclaude
andcommitted
fix: remove broken CI coverage infrastructure
The coverage collection had multiple issues: - Wrong pytest markers caused 0 tests to run - Postgres jobs silently skipped artifact uploads - Coverage Summary job failed when artifacts were missing - uv venv picked wrong Python version for coverage jobs Simplify: every job just runs tests via `just` recipes. No more dual code paths, artifact uploads, or summary aggregation job. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: phernandez <paul@basicmachines.co>
1 parent bd50991 commit 3a2b80b

1 file changed

Lines changed: 0 additions & 142 deletions

File tree

.github/workflows/test.yml

Lines changed: 0 additions & 142 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ jobs:
5959
include:
6060
- os: ubuntu-latest
6161
python-version: "3.12"
62-
coverage: true
6362
- os: ubuntu-latest
6463
python-version: "3.13"
6564
- os: ubuntu-latest
@@ -93,24 +92,10 @@ jobs:
9392
run: |
9493
uv pip install -e ".[dev]"
9594
96-
- name: Run tests with coverage
97-
if: matrix.coverage && github.event_name == 'push' && github.ref == 'refs/heads/main'
98-
run: |
99-
BASIC_MEMORY_ENV=test uv run coverage run --data-file=.coverage.sqlite-unit --source=basic_memory -m pytest -p pytest_mock -v --no-cov tests
100-
10195
- name: Run tests
102-
if: "!(matrix.coverage && github.event_name == 'push' && github.ref == 'refs/heads/main')"
10396
run: |
10497
just test-unit-sqlite
10598
106-
- name: Upload coverage data
107-
if: matrix.coverage && github.event_name == 'push' && github.ref == 'refs/heads/main'
108-
uses: actions/upload-artifact@v4
109-
with:
110-
name: coverage-sqlite-unit
111-
path: .coverage.sqlite-unit
112-
retention-days: 1
113-
11499
test-sqlite-integration:
115100
name: Test SQLite Integration (${{ matrix.os }}, Python ${{ matrix.python-version }})
116101
timeout-minutes: 45
@@ -121,7 +106,6 @@ jobs:
121106
include:
122107
- os: ubuntu-latest
123108
python-version: "3.12"
124-
coverage: true
125109
- os: ubuntu-latest
126110
python-version: "3.13"
127111
- os: ubuntu-latest
@@ -155,24 +139,10 @@ jobs:
155139
run: |
156140
uv pip install -e ".[dev]"
157141
158-
- name: Run tests with coverage
159-
if: matrix.coverage && github.event_name == 'push' && github.ref == 'refs/heads/main'
160-
run: |
161-
BASIC_MEMORY_ENV=test uv run coverage run --data-file=.coverage.sqlite-int --source=basic_memory -m pytest -p pytest_mock -v --no-cov -m "not semantic" test-int
162-
163142
- name: Run tests
164-
if: "!(matrix.coverage && github.event_name == 'push' && github.ref == 'refs/heads/main')"
165143
run: |
166144
just test-int-sqlite
167145
168-
- name: Upload coverage data
169-
if: matrix.coverage && github.event_name == 'push' && github.ref == 'refs/heads/main'
170-
uses: actions/upload-artifact@v4
171-
with:
172-
name: coverage-sqlite-int
173-
path: .coverage.sqlite-int
174-
retention-days: 1
175-
176146
test-postgres-unit:
177147
name: Test Postgres Unit (Python ${{ matrix.python-version }})
178148
timeout-minutes: 30
@@ -182,7 +152,6 @@ jobs:
182152
matrix:
183153
include:
184154
- python-version: "3.12"
185-
coverage: true
186155
- python-version: "3.13"
187156
- python-version: "3.14"
188157
runs-on: ubuntu-latest
@@ -214,25 +183,10 @@ jobs:
214183
run: |
215184
uv pip install -e ".[dev]"
216185
217-
- name: Run tests with coverage
218-
if: matrix.coverage && github.event_name == 'push' && github.ref == 'refs/heads/main'
219-
run: |
220-
timeout --signal=KILL 600 bash -c 'BASIC_MEMORY_ENV=test BASIC_MEMORY_TEST_POSTGRES=1 uv run coverage run --data-file=.coverage.postgres-unit --source=basic_memory -m pytest -p pytest_mock -v --no-cov tests' || test $? -eq 137
221-
222186
- name: Run tests
223-
if: "!(matrix.coverage && github.event_name == 'push' && github.ref == 'refs/heads/main')"
224187
run: |
225188
just test-unit-postgres
226189
227-
- name: Upload coverage data
228-
if: matrix.coverage && github.event_name == 'push' && github.ref == 'refs/heads/main'
229-
uses: actions/upload-artifact@v4
230-
with:
231-
name: coverage-postgres-unit
232-
path: .coverage.postgres-unit
233-
retention-days: 1
234-
if-no-files-found: warn
235-
236190
test-postgres-integration:
237191
name: Test Postgres Integration (Python ${{ matrix.python-version }})
238192
timeout-minutes: 45
@@ -242,7 +196,6 @@ jobs:
242196
matrix:
243197
include:
244198
- python-version: "3.12"
245-
coverage: true
246199
- python-version: "3.13"
247200
- python-version: "3.14"
248201
runs-on: ubuntu-latest
@@ -274,25 +227,10 @@ jobs:
274227
run: |
275228
uv pip install -e ".[dev]"
276229
277-
- name: Run tests with coverage
278-
if: matrix.coverage && github.event_name == 'push' && github.ref == 'refs/heads/main'
279-
run: |
280-
timeout --signal=KILL 600 bash -c 'BASIC_MEMORY_ENV=test BASIC_MEMORY_TEST_POSTGRES=1 uv run coverage run --data-file=.coverage.postgres-int --source=basic_memory -m pytest -p pytest_mock -v --no-cov -m "not semantic" test-int' || test $? -eq 137
281-
282230
- name: Run tests
283-
if: "!(matrix.coverage && github.event_name == 'push' && github.ref == 'refs/heads/main')"
284231
run: |
285232
just test-int-postgres
286233
287-
- name: Upload coverage data
288-
if: matrix.coverage && github.event_name == 'push' && github.ref == 'refs/heads/main'
289-
uses: actions/upload-artifact@v4
290-
with:
291-
name: coverage-postgres-int
292-
path: .coverage.postgres-int
293-
retention-days: 1
294-
if-no-files-found: warn
295-
296234
test-semantic:
297235
name: Test Semantic (Python 3.12)
298236
timeout-minutes: 45
@@ -324,86 +262,6 @@ jobs:
324262
run: |
325263
uv pip install -e ".[dev]"
326264
327-
- name: Run tests with coverage
328-
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
329-
run: |
330-
BASIC_MEMORY_ENV=test uv run coverage run --data-file=.coverage.semantic --source=basic_memory -m pytest -p pytest_mock -v --no-cov -m semantic test-int/semantic/
331-
332265
- name: Run tests
333-
if: "!(github.event_name == 'push' && github.ref == 'refs/heads/main')"
334266
run: |
335267
just test-semantic
336-
337-
- name: Upload coverage data
338-
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
339-
uses: actions/upload-artifact@v4
340-
with:
341-
name: coverage-semantic
342-
path: .coverage.semantic
343-
retention-days: 1
344-
345-
coverage:
346-
name: Coverage Summary
347-
timeout-minutes: 10
348-
needs:
349-
- test-sqlite-unit
350-
- test-sqlite-integration
351-
- test-postgres-unit
352-
- test-postgres-integration
353-
- test-semantic
354-
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
355-
runs-on: ubuntu-latest
356-
357-
steps:
358-
- uses: actions/checkout@v4
359-
with:
360-
submodules: true
361-
362-
- name: Set up Python 3.12
363-
uses: actions/setup-python@v4
364-
with:
365-
python-version: "3.12"
366-
cache: "pip"
367-
368-
- name: Install uv
369-
run: |
370-
pip install uv
371-
372-
- name: Create virtual env
373-
run: |
374-
uv venv
375-
376-
- name: Install dependencies
377-
run: |
378-
uv pip install -e ".[dev]"
379-
380-
- name: Download all coverage artifacts
381-
uses: actions/download-artifact@v4
382-
with:
383-
pattern: coverage-*
384-
merge-multiple: true
385-
386-
- name: Combine coverage and report
387-
run: |
388-
ls -la .coverage.* || echo "No coverage files found"
389-
uv run coverage combine .coverage.*
390-
uv run coverage report -m
391-
uv run coverage html
392-
393-
- name: Add coverage report to job summary
394-
if: always()
395-
run: |
396-
{
397-
echo "## Coverage"
398-
echo ""
399-
echo '```'
400-
uv run coverage report -m
401-
echo '```'
402-
} >> "$GITHUB_STEP_SUMMARY"
403-
404-
- name: Upload HTML coverage report
405-
if: always()
406-
uses: actions/upload-artifact@v4
407-
with:
408-
name: htmlcov
409-
path: htmlcov/

0 commit comments

Comments
 (0)