@@ -14,22 +14,24 @@ jobs:
1414 os : [ubuntu-latest, windows-latest, macos-latest]
1515 python-version : ["3.9", "3.10", "3.11", "3.12", "3.13"]
1616 runs-on : ${{ matrix.os }}
17- steps :
18- - name : π₯ Checkout the repository
19- uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
17+ steps :
18+ - name : π₯ Checkout the repository
19+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2020
21- - name : π Install uv and set Python version ${{ matrix.python-version }}
22- uses : astral-sh/setup-uv@85856786d1ce8acfbcc2f13a5f3fbd6b938f9f41 # v7.1.2
23- with :
24- python-version : ${{ matrix.python-version }}
25- activate-environment : true
21+ - name : π Install uv and set Python version ${{ matrix.python-version }}
22+ uses : astral-sh/setup-uv@85856786d1ce8acfbcc2f13a5f3fbd6b938f9f41 # v7.1.2
23+ with :
24+ python-version : ${{ matrix.python-version }}
25+ activate-environment : true
26+ enable-cache : true # Recommended: caches the uv download/builds
2627
28+ - name : π Install Packages
29+ # CHANGED: 'uv sync' enforces the versions in uv.lock
30+ run : uv sync --group dev --group docs --extra metrics
2731
28- - name : π Install Packages
29- run : uv pip install -r pyproject.toml --group dev --group docs --extra metrics
32+ - name : π§ͺ Run the Import test
33+ # 'uv run' executes inside the environment created by 'uv sync'
34+ run : uv run python -c "import supervision; from supervision import assets; from supervision import metrics; print(supervision.__version__)"
3035
31- - name : π§ͺ Run the Import test
32- run : uv run python -c "import supervision; from supervision import assets; from supervision import metrics; print(supervision.__version__)"
33-
34- - name : π§ͺ Run the Test
35- run : uv run pytest
36+ - name : π§ͺ Run the Test
37+ run : uv run pytest
0 commit comments