Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Ensure we're using the right py version when testing on CI #655

Merged
merged 4 commits into from
Oct 14, 2024
Merged
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
17 changes: 10 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ env:
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: "sccache"
# Pinned version for the uv package manager
UV_VERSION: "0.4.18"
UV_VERSION: "0.4.20"
# The highest and lowest supported Python versions, used for testing
PYTHON_HIGHEST: "3.12"
PYTHON_LOWEST: "3.10"

jobs:
# Check if changes were made to the relevant files.
Expand Down Expand Up @@ -89,10 +92,10 @@ jobs:
with:
version: ${{ env.UV_VERSION }}
enable-cache: true
- name: Install Python 3.12
run: uv python install 3.12
- name: Install Python ${{ env.PYTHON_HIGHEST }}
run: uv python install ${{ env.PYTHON_HIGHEST }}
- name: Setup dependencies
run: uv sync --locked
run: uv sync --locked --python ${{ env.PYTHON_HIGHEST }}
- name: Type check with mypy
run: uv run mypy .
- name: Check formatting with ruff
Expand Down Expand Up @@ -231,10 +234,10 @@ jobs:
with:
version: ${{ env.UV_VERSION }}
enable-cache: true
- name: Install Python 3.10
run: uv python install 3.10
- name: Install Python ${{ env.PYTHON_LOWEST }}
run: uv python install ${{ env.PYTHON_LOWEST }}
- name: Setup dependencies
run: uv sync --locked
run: uv sync --locked --python ${{ env.PYTHON_LOWEST }}
- name: Run python tests with coverage instrumentation
run: uv run pytest --cov=./ --cov-report=xml
- name: Upload coverage output artifact
Expand Down
Loading