Skip to content

Python Test

Python Test #112

Workflow file for this run

name: Python Test
permissions: {}
on:
workflow_dispatch:
push:
branches: ["main"]
paths-ignore:
- "doc/**"
- "**/*.md"
- ".github/workflows/static-checks.yml"
- ".pre-commit-config.yaml"
pull_request:
paths-ignore:
- "doc/**"
- "**/*.md"
- ".github/workflows/static-checks.yml"
- ".pre-commit-config.yaml"
schedule:
- cron: "20 14 * * *"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
tests:
name: ${{ format('Test Python {0} {1}', matrix.python_version, ((matrix.dependencies == 'min' || matrix.dependencies == 'max') && format('{0} dependencies', matrix.dependencies)) || (matrix.os || 'ubuntu-latest')) }}
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
env:
PYTHONIOENCODING: utf-8
steps:
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Set up uv
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
with:
version: ${{ matrix.uv_version || 'latest' }}
enable-cache: true
python-version: ${{ matrix.python_version }}
- name: Setup dependencies
run: |
uv sync $CI_UV_UPGRADE_ARG
env:
CI_UV_UPGRADE_ARG: ${{ matrix.dependencies == 'max' && '--upgrade' || '' }}
UV_RESOLUTION: ${{ matrix.dependencies == 'min' && 'lowest-direct' || 'highest' }}
- name: Run pytest
run: uv run --frozen pytest -v
strategy:
matrix:
python_version: ["3.10", "3.14"]
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
dependencies: ["lockfile"]
include:
- python_version: "3.11"
os: "ubuntu-latest"
- python_version: "3.12"
os: "ubuntu-latest"
- python_version: "3.13"
os: "ubuntu-latest"
- dependencies: "min"
python_version: "3.10"
uv_version: "0.9.9"
- dependencies: "max"
python_version: "3.14"