ci: test multiple python versions (#345)

This commit is contained in:
Marcelo Trylesinski
2025-03-25 12:57:56 +01:00
committed by GitHub
parent fd2fd34357
commit 9ec6db201f
3 changed files with 13 additions and 29 deletions

View File

@@ -14,14 +14,11 @@ jobs:
- name: Install uv - name: Install uv
uses: astral-sh/setup-uv@v3 uses: astral-sh/setup-uv@v3
- name: "Set up Python"
uses: actions/setup-python@v5
with: with:
python-version-file: ".python-version" enable-cache: true
- name: Install the project - name: Set up Python 3.12
run: uv sync --frozen --all-extras --dev run: uv python install 3.12
- name: Build - name: Build
run: uv build run: uv build

View File

@@ -14,16 +14,11 @@ jobs:
with: with:
enable-cache: true enable-cache: true
- name: "Set up Python"
uses: actions/setup-python@v5
with:
python-version-file: ".python-version"
- name: Install the project - name: Install the project
run: uv sync --frozen --all-extras --dev run: uv sync --frozen --all-extras --dev --python 3.12
- name: Run ruff format check - name: Run ruff format check
run: uv run --frozen ruff check . run: uv run --no-sync ruff check .
typecheck: typecheck:
runs-on: ubuntu-latest runs-on: ubuntu-latest
@@ -35,19 +30,17 @@ jobs:
with: with:
enable-cache: true enable-cache: true
- name: "Set up Python"
uses: actions/setup-python@v5
with:
python-version-file: ".python-version"
- name: Install the project - name: Install the project
run: uv sync --frozen --all-extras --dev run: uv sync --frozen --all-extras --dev --python 3.12
- name: Run pyright - name: Run pyright
run: uv run --frozen pyright run: uv run --no-sync pyright
build: test:
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
@@ -57,13 +50,8 @@ jobs:
with: with:
enable-cache: true enable-cache: true
- name: "Set up Python"
uses: actions/setup-python@v5
with:
python-version-file: ".python-version"
- name: Install the project - name: Install the project
run: uv sync --frozen --all-extras --dev run: uv sync --frozen --all-extras --dev --python ${{ matrix.python-version }}
- name: Run pytest - name: Run pytest
run: uv run --frozen pytest run: uv run --no-sync pytest

View File

@@ -1 +0,0 @@
3.10