The dependabot bump moved pyproject's ruff pin to 0.16.1, but nothing else followed it, so the repo asked for three different versions at once: - pyproject.toml said 0.16.1 (the bump) - uv.lock still resolved 0.15.20 (dependabot did not update it) - .github/workflows/ci.yml installed 0.15.14 by its own literal pin The lint job never reads pyproject, so CI kept linting with 0.15.14 and reported this PR green without 0.16.1 ever running. The ci.yml pin had already drifted from pyproject before this bump, under a comment saying to keep them identical. - ci.yml: pin 0.16.1 to match pyproject. - uv.lock: regenerated so the locked resolution agrees. - test_ruff_pins_match: assert ci.yml and pyproject stay equal, so the next bump that touches only one of them fails loudly instead of passing blind. - extend-exclude '*.md': 0.16 began formatting Python inside markdown fences, taking the formatter from 199 files to 295 and reflowing hand-aligned example code in docs/rfcs/002 and three website pages. Excluding docs keeps this a version bump rather than a silent documentation reflow, and restores the exact file scope the project has always formatted. Verified with 0.16.1 actually installed: ruff check and ruff format --check both clean over the same 199 files, full suite green (3669 passed).
74 lines
2.8 KiB
YAML
74 lines
2.8 KiB
YAML
name: Tests
|
|
|
|
on:
|
|
push:
|
|
branches: [main, develop]
|
|
pull_request:
|
|
branches: [main, develop]
|
|
|
|
jobs:
|
|
test-linux:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
python-version: ["3.9", "3.11", "3.13"]
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
- uses: actions/setup-python@v6
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
cache: 'pip'
|
|
- run: pip install -e ".[dev]"
|
|
- run: python -m pytest tests/ -v --ignore=tests/benchmarks --cov=mempalace --cov-report=term-missing --cov-fail-under=80 --durations=10
|
|
|
|
test-windows:
|
|
runs-on: windows-latest
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
- uses: actions/setup-python@v6
|
|
with:
|
|
python-version: "3.13"
|
|
cache: 'pip'
|
|
- run: pip install -e ".[dev]"
|
|
# ChromaDB's rust HNSW core intermittently fails compaction or reader
|
|
# initialization on Windows ("Failed to apply logs to the hnsw segment
|
|
# writer" / "Error creating hnsw segment reader: Nothing found on disk")
|
|
# regardless of our code — long-standing, non-reproducible-on-Linux/macOS
|
|
# flakes. Retry ONLY those specific transient errors (via --only-rerun) so real,
|
|
# deterministic failures still fail on the first run. Linux/macOS jobs
|
|
# deliberately run with no reruns so genuine regressions surface there.
|
|
- run: >-
|
|
python -m pytest tests/ -v --ignore=tests/benchmarks --cov=mempalace
|
|
--cov-report=term-missing --cov-fail-under=80 --durations=10 --reruns 2
|
|
--reruns-delay 5 --only-rerun
|
|
"Failed to apply logs to the hnsw segment writer|Error creating hnsw segment reader: Nothing found on disk"
|
|
|
|
test-macos:
|
|
runs-on: macos-latest
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
- uses: actions/setup-python@v6
|
|
with:
|
|
python-version: "3.13"
|
|
cache: 'pip'
|
|
- run: pip install -e ".[dev]"
|
|
- run: python -m pytest tests/ -v --ignore=tests/benchmarks --cov=mempalace --cov-report=term-missing --cov-fail-under=80 --durations=10
|
|
lint:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
- uses: actions/setup-python@v6
|
|
with:
|
|
python-version: "3.11"
|
|
cache: 'pip'
|
|
# Keep this pin identical to the `ruff==` pin in pyproject.toml
|
|
# ([project.optional-dependencies].dev and [dependency-groups].dev)
|
|
# so CI and `pip install -e ".[dev]"` format/lint identically.
|
|
# This drifted once (CI on 0.15.14 against pyproject's 0.15.20) and the
|
|
# drift was invisible: the lint job never installs from pyproject, so a
|
|
# dependabot bump to the pin there passes CI without the new version
|
|
# ever running. test_ruff_pins_match asserts the two stay equal.
|
|
- run: pip install "ruff==0.16.1"
|
|
- run: ruff check .
|
|
- run: ruff format --check .
|