1010
1111jobs :
1212 tests :
13+ name : Tests (hgraph ${{ matrix.hgraph }})
1314 runs-on : ubuntu-latest
1415
16+ strategy :
17+ # Report both lines rather than stopping at the first failure: which one
18+ # broke is the useful signal.
19+ fail-fast : false
20+ matrix :
21+ # This package supports clients on both hgraph lines, so both gate.
22+ # "resolved" is whatever the lock resolves to today, which is the 0.8
23+ # C++-first line; "0.5" is the floor pyproject declares, which is the
24+ # Python-first line. Testing only the former let a 0.5-only failure in
25+ # hg_oap sit undetected until someone installed it by hand.
26+ hgraph : [ resolved, "0.5" ]
27+
1528 steps :
1629 - name : checkout
1730 uses : actions/checkout@v4
3043 - name : Install dependencies
3144 run : uv sync --all-extras --all-groups
3245
46+ # `uv pip` needs an explicit interpreter: without one it installs into
47+ # whichever environment it discovers, which is not necessarily the one
48+ # `uv sync` just populated, and the pin silently does nothing.
49+ #
50+ # The web extra comes along because hg_oap requires it; naming it here
51+ # keeps the pin from dropping it.
52+ - name : Pin hgraph to the 0.5 line
53+ if : matrix.hgraph == '0.5'
54+ run : uv pip install --python .venv/bin/python "hgraph[web]>=0.5.41,<0.6"
55+
56+ - name : Report the hgraph actually under test
57+ run : .venv/bin/python -c "import importlib.metadata as m; print('hgraph', m.version('hgraph'))"
58+
59+ # --no-sync matters: a plain `uv run` re-syncs from the lock first, which
60+ # would reinstate the resolved version and turn the 0.5 leg into a green
61+ # no-op.
3362 - name : Run tests
34- run : uv run pytest -ra -q --dist=loadscope --cov=hg_systematic --cov-report=xml
63+ run : uv run --no-sync pytest -ra -q --dist=loadscope --cov=hg_systematic --cov-report=xml
0 commit comments