Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,38 @@ jobs:

- name: Run unit tests
run: pixi run -e test pytest tests/unit -v

# Windows unit tests: guard OS-specific behavior (path separators, etc.) that
# the Linux jobs above cannot catch — e.g. #1520, where file-protocol paths
# rendered with native backslashes broke garbage collection on Windows.
# pixi targets linux/osx only (see [tool.pixi] platforms), so this leg uses
# pip. Unit tests need no containers, so no Docker/DB is required on Windows.
unit-tests-windows:
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
# Exercise both ends of the supported range (requires-python >=3.10,<3.15).
python-version: ["3.10", "3.14"]
name: unit-tests-windows (py${{ matrix.python-version }})
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # hatch-vcs derives the version from git history/tags

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

# NOTE: pip resolves `[project.optional-dependencies].test`, which is a
# DIFFERENT set than the pixi Linux legs' `[dependency-groups].test`
# (e.g. it omits graphviz). A unit test importing a dep present in only
# one set would then pass on Linux but error on Windows (or vice versa) —
# a dep-set mismatch that reads like an OS bug. Keep the two `test` sets
# in sync when unit-test dependencies change.
- name: Install package with test extras
run: pip install -e ".[test]"

- name: Run unit tests
run: pytest tests/unit -v
Loading