diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d5f8522..271c1f5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,21 +16,35 @@ jobs: with: python-version: "3.11" - # --locked fails the job when uv.lock does not match pyproject, so CI - # resolves exactly what a developer resolved rather than picking up a - # newer release mid-run. --no-build installs from wheels only, which - # keeps a dependency's setup.py from executing on the runner. + # Plain `uv sync`, deliberately, on two counts. # - # The editable workspace members install regardless: --no-build refuses - # source distributions of dependencies, not a local editable install. - # Verified both ways, since the flag reads as though it would block them: - # a sync with an empty UV_CACHE_DIR into a fresh environment installs - # coordinode, langchain-coordinode and llama-index-graph-stores-coordinode - # and imports them, and every job below has run green with the flag on a - # clean runner. Remove it only with evidence, not on the wording. - - run: uv sync --locked --no-build - - run: uv run --locked --no-build ruff check coordinode/ langchain-coordinode/ llama-index-coordinode/ tests/ - - run: uv run --locked --no-build ruff format --check coordinode/ langchain-coordinode/ llama-index-coordinode/ tests/ + # Resolving fresh is wanted on the pull requests where it actually + # happens, which is not all of them. `uv sync` follows the committed lock + # while that lock satisfies pyproject.toml, so an ordinary pull request + # installs the locked versions. When a pull request moves dependency + # metadata without regenerating the lock, uv resolves the new set and + # these jobs exercise it. `--locked` would instead refuse to run and + # report that the lock needs updating, which says nothing about whether + # the new version works. + # + # The two flags tried here also break the release, and for one shared + # reason: the release bumps the version in pyproject.toml and leaves + # uv.lock naming the old one, so uv has to re-resolve. + # + # --locked fails on exactly that mismatch, reporting that the + # lockfile needs to be updated. + # --no-build fails because re-resolving means building this + # workspace's own three packages, which are source rather + # than wheels: "Building source distributions for + # coordinode is disabled". + # + # Verified on the release branch with a cold cache: both fail there, and + # both pass on that same branch once uv.lock carries the new version. So + # restoring either one means first making the release regenerate the + # lock, and even then it gives up the fresh resolution described above. + - run: uv sync + - run: uv run ruff check coordinode/ langchain-coordinode/ llama-index-coordinode/ tests/ + - run: uv run ruff format --check coordinode/ langchain-coordinode/ llama-index-coordinode/ tests/ test: name: Test (Python ${{ matrix.python-version }}) @@ -49,13 +63,13 @@ jobs: python-version: ${{ matrix.python-version }} - name: Install dependencies - run: uv sync --locked --no-build --all-packages + run: uv sync --all-packages - name: Generate proto stubs - run: uv run --locked --no-build make proto + run: uv run make proto - name: Unit tests - run: uv run --locked --no-build pytest tests/unit/ -v + run: uv run pytest tests/unit/ -v build-embedded: name: Build embedded (CI check) @@ -83,7 +97,7 @@ jobs: - name: Install wheel + run embedded tests # The main `test` job skips coordinode_embedded with importorskip # because that runner doesn't build the wheel. This job has the - # wheel — install it and run the embedded tests here, then assert + # wheel, so install it and run the embedded tests here, then assert # nothing was skipped (a skip with the wheel installed means a # broken manylinux glibc / missing numpy / etc., not the expected # "no wheel" condition). @@ -116,7 +130,7 @@ jobs: exit 1 fi if ! echo "$OUTPUT" | grep -qE '=+ [0-9]+ passed'; then - echo "::error::No tests passed — the module was likely not collected" + echo "::error::No tests passed; the module was likely not collected" exit 1 fi @@ -151,7 +165,7 @@ jobs: echo "coordinode is ready (attempt $i)" exit 0 fi - echo "Attempt $i/30 — not ready yet, sleeping 5s..." + echo "Attempt $i/30, not ready yet, sleeping 5s..." sleep 5 done echo "Error: coordinode did not become healthy after 150s" >&2 @@ -159,10 +173,10 @@ jobs: - name: Install + generate proto run: | - uv sync --locked --no-build --all-packages - uv run --locked --no-build make proto + uv sync --all-packages + uv run make proto - name: Integration tests env: COORDINODE_ADDR: "localhost:7080" - run: uv run --locked --no-build pytest tests/integration/ -v --timeout=30 + run: uv run pytest tests/integration/ -v --timeout=30