| 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.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@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3 | |
| 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 |