Skip to content
Merged
Show file tree
Hide file tree
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
14 changes: 2 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,24 +43,14 @@ jobs:
with:
version: ${{ matrix.uv_version || 'latest' }}
enable-cache: true

- name: Set up Python
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
with:
python-version: ${{ matrix.python_version }}

- name: Bump dependencies
if: ${{ matrix.dependencies == 'max' }}
run: |
uv sync --upgrade

- name: Setup dependencies
run: |
uv python pin $CI_PYTHON_VERSION
uv sync
uv sync $CI_UV_UPGRADE_ARG
env:
CI_UV_UPGRADE_ARG: ${{ matrix.dependencies == 'max' && '--upgrade' || '' }}
UV_RESOLUTION: ${{ matrix.dependencies == 'min' && 'lowest-direct' || 'highest' }}
CI_PYTHON_VERSION: ${{ matrix.python_version }}

- name: Run prek
if: ${{ matrix.pre_commit == null || matrix.pre_commit == 'true' }}
Expand Down
6 changes: 6 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import os
import shutil
from collections.abc import Generator
from enum import Enum
Expand All @@ -9,6 +10,11 @@
from usethis._integrations.backend.uv.call import call_subprocess, call_uv_subprocess
from usethis._test import change_cwd, is_offline

if "UV_PYTHON" in os.environ:
# To allow test subprocesses to use different versions of Python than the one
# running the tests.
del os.environ["UV_PYTHON"]


@pytest.fixture(scope="session")
def _uv_init_dir(tmp_path_factory: pytest.TempPathFactory) -> Path:
Expand Down