Skip to content

infra: migrate to uv and ruff #387

infra: migrate to uv and ruff

infra: migrate to uv and ruff #387

Workflow file for this run

name: test
on: pull_request
jobs:
linting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/setup-python@v6
with:
python-version: 3.12
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
activate-environment: true
enable-cache: true
- name: Install dependencies
run: uv sync --locked --all-extras --dev
- run: uv run pre-commit run --all-files
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.11", "3.12", "3.13", "3.14"]
fastapi-version: ["0.111.1", "0.138.2"]
steps:
- name: Check out repository
uses: actions/checkout@v5
- name: Set up python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
activate-environment: true
enable-cache: true
- name: Install dependencies
run: uv sync --locked --all-extras --dev
- name: Install FastAPI ${{ matrix.fastapi-version }}
run: |
source .venv/bin/activate
uv add "fastapi==${{ matrix.fastapi-version }}"
- name: Run tests
run: |
source .venv/bin/activate
uv run pytest --cov=fastapi_azure_auth --verbose --assert=plain
uv run coverage report