blob: 0f4cfd8b2f3c49cb61353c10fb29125238f6c6f9 [file]
name: Unit Tests
on:
pull_request:
branches: [main]
push:
branches: [main]
workflow_dispatch:
jobs:
build:
runs-on: runs-on=${{ github.run_id }}/runner=2cpu-linux-x64/tag=infra
strategy:
max-parallel: 4
fail-fast: false
matrix:
python-version:
- "3.10"
- "3.11"
- "3.12"
- "3.13"
- "3.14"
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0 # need all versions to be able to access server tree commit logs
persist-credentials: false
- name: Install uv and set the Python version
uses: astral-sh/setup-uv@1db35dd8eee11c5894872e0b383ae6c406cf738d # v10.4.0
with:
version: "latest-known"
python-version: ${{ matrix.python-version }}
enable-cache: true # enable built-in caching of uv
- uses: awalsh128/cache-apt-pkgs-action@5902b33ae29014e6ca012c5d8025d4346556bd40 # latest
with:
packages: python3-dev libldap2-dev libsasl2-dev
version: 1.0
- name: Install dependencies
run: uv sync --locked --all-extras --group test
- name: Test with pytest
run: uv run pytest -rA