Skip to content

Commit e4d79a6

Browse files
fix(ci): unblock unittest matrix and seed ubuntu benchmark baselines
1 parent c126227 commit e4d79a6

5 files changed

Lines changed: 18 additions & 13 deletions

File tree

.github/workflows/tests.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,8 @@ jobs:
114114
# Pytest fixtures (tests/conftest.py) build a temp workspaceStorage and
115115
# exercise Flask routes via app.test_client(). Only listed files — not
116116
# `pytest tests/` — to avoid re-collecting unittest.TestCase classes above.
117-
run: python -m pytest tests/test_api_search.py tests/test_api_workspaces.py tests/test_api_export.py tests/test_pdf_export.py tests/test_search_helpers.py -v --tb=short
117+
# -o addopts= avoids inheriting benchmark-only options from pyproject.toml.
118+
run: python -m pytest tests/test_api_search.py tests/test_api_workspaces.py tests/test_api_export.py tests/test_pdf_export.py tests/test_search_helpers.py -v --tb=short -o addopts=
118119

119120
# ── PyInstaller desktop build (Windows only, once per workflow) ────────
120121
# Closes #44. Builds the onedir bundle and smoke-tests --help so the

benchmarks/baselines.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
{
2-
"_note": "Gated means from local reference run with 1.5x slack (Windows dev host). Refresh from ubuntu-latest CI artifact after first green benchmark job.",
3-
"updated": "2026-06-25T00:00:00Z",
4-
"machine": "Windows",
2+
"_note": "Gated means from ubuntu-latest CI benchmark-results.json (PR #7 summary-cache benchmarks). Refresh via: pytest tests/benchmarks/ --benchmark-only --benchmark-json=benchmark-results.json -o addopts= then update these values.",
3+
"updated": "2026-06-25T12:00:00Z",
4+
"machine": "Linux",
55
"groups": {
66
"summary-cache": {
7-
"test_summary_cache_hit": 8.91e-05,
8-
"test_summary_cache_miss": 8.13e-05,
9-
"test_fingerprint_workspace_entries[10]": 0.001708,
10-
"test_fingerprint_workspace_entries[50]": 0.005457,
11-
"test_fingerprint_workspace_entries[200]": 0.01715,
12-
"test_summary_cache_round_trip": 0.001667
7+
"test_summary_cache_hit": 6.3e-05,
8+
"test_summary_cache_miss": 6.3e-05,
9+
"test_fingerprint_workspace_entries[10]": 0.001844,
10+
"test_fingerprint_workspace_entries[50]": 0.007759,
11+
"test_fingerprint_workspace_entries[200]": 0.022231,
12+
"test_summary_cache_round_trip": 0.000351
1313
}
1414
}
1515
}

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ dev = [
3737
]
3838

3939
[tool.pytest.ini_options]
40-
addopts = "--benchmark-skip"
4140
testpaths = ["tests"]
4241
markers = [
4342
"benchmark: performance benchmarks (pytest-benchmark)",

requirements-lock.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# Lock is generated on Linux (CI / update-lock.yml). Windows-only transitives (e.g.
77
# colorama via click) are omitted — pip still installs them on Windows when needed.
88
blinker==1.9.0 # via flask
9-
click==8.4.1 # via flask
9+
click==8.4.2 # via flask
1010
defusedxml==0.7.1 # via fpdf2
1111
flask==3.1.3 # via -r requirements.txt
1212
fonttools==4.63.0 # via fpdf2

scripts/check_benchmark_regression.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,12 @@ def check_regression(
9292
baseline_means = load_baseline_means(baselines_path)
9393

9494
failures: list[str] = []
95+
missing: list[str] = []
9596
for name, base in baseline_means.items():
9697
cur = flat.get(name)
9798
if cur is None:
98-
print(f"WARN: no current result for baseline {name!r}; skipping")
99+
print(f"FAIL: no current result for gated baseline {name!r}")
100+
missing.append(name)
99101
continue
100102
if base == 0:
101103
print(f"WARN: baseline for {name!r} is zero; skipping ratio check")
@@ -112,6 +114,9 @@ def check_regression(
112114

113115
if failures:
114116
print(f"\nREGRESSION: {len(failures)} benchmark(s) exceeded {threshold:.0%}")
117+
if missing:
118+
print(f"\nMISSING: {len(missing)} gated benchmark(s) absent from current results")
119+
if failures or missing:
115120
return 1
116121
return 0
117122

0 commit comments

Comments
 (0)