Ensure GitHub Actions CI runs are repeatable, targeted, and don’t rely on brittle hacks.
1) Run tests using the environment you just prepared
uv sync, run pytest using the created venv/python (or otherwise guarantee uv run uses the synced environment without re-installing).2) Install the project instead of mutating PYTHONPATH
name: Set up uv uses: astral-sh/setup-uv@v7
name: Install dependencies run: | uv sync –extra cpu uv pip install -e . # CPU-only torch for Linux runners without CUDA uv pip install torch torchvision –index-url https://download.pytorch.org/whl/cpu
3) Keep workflows minimal and aligned with support
on.push to master/main (and use pull_request for PR validation) rather than running on every branch push.if: conditions for OSes not in the matrix.Applying this prevents CI flakiness from environment mismatches, reduces “works on my machine” import issues, and cuts unnecessary CI load.
Enter the URL of a public GitHub repository