2022-11-24 14:34:30 +00:00
|
|
|
---
|
|
|
|
name: tests
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
2022-11-24 14:36:57 +00:00
|
|
|
- main
|
|
|
|
- '*.*.*'
|
2022-11-24 14:34:30 +00:00
|
|
|
pull_request:
|
|
|
|
branches:
|
2022-11-24 14:36:57 +00:00
|
|
|
- main
|
|
|
|
- '*.*.*'
|
2022-11-24 14:34:30 +00:00
|
|
|
jobs:
|
|
|
|
tests:
|
2024-10-28 08:01:52 +00:00
|
|
|
name: py${{ matrix.python }} unit tests
|
2022-11-24 14:34:30 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
python:
|
2024-10-27 10:21:42 +00:00
|
|
|
- '3.13'
|
2023-11-01 19:22:26 +00:00
|
|
|
- '3.12'
|
2022-11-24 14:34:30 +00:00
|
|
|
- '3.11'
|
|
|
|
- '3.10'
|
|
|
|
steps:
|
2024-04-14 17:44:01 +00:00
|
|
|
- uses: actions/checkout@v4
|
2024-10-28 08:01:52 +00:00
|
|
|
- name: Install uv
|
|
|
|
uses: astral-sh/setup-uv@v3
|
2022-11-24 14:34:30 +00:00
|
|
|
with:
|
2024-10-28 08:01:52 +00:00
|
|
|
enable-cache: true
|
|
|
|
- name: Install Python ${{ matrix.python }}
|
|
|
|
run: uv python install ${{ matrix.python }}
|
2022-11-24 14:53:25 +00:00
|
|
|
- name: Install apt dependencies
|
2024-04-27 08:10:45 +00:00
|
|
|
run: |
|
|
|
|
sudo apt update
|
|
|
|
sudo DEBIAN_FRONTEND=noninteractive apt --yes --quiet install apparmor-utils libsasl2-dev python3-dev libldap2-dev libssl-dev slapd ldap-utils
|
2022-11-24 14:53:25 +00:00
|
|
|
- name: App armor configuration for slapd
|
2024-04-27 08:10:45 +00:00
|
|
|
if: ${{ !env.ACT }}
|
2022-11-24 14:53:25 +00:00
|
|
|
run: sudo aa-complain /usr/sbin/slapd
|
2024-10-28 08:01:52 +00:00
|
|
|
- name: Run tests
|
2024-05-08 07:37:25 +00:00
|
|
|
run: |
|
2024-04-27 08:10:45 +00:00
|
|
|
# python tzinfo fails on 'act' without this
|
|
|
|
ulimit -n 1024
|
|
|
|
export TZ=UTC
|
2024-11-06 19:13:16 +00:00
|
|
|
uv sync --all-extras
|
2025-01-02 22:54:10 +00:00
|
|
|
uv run pytest --numprocesses auto
|
2024-10-28 08:01:52 +00:00
|
|
|
|
2023-08-13 11:10:27 +00:00
|
|
|
minversions:
|
|
|
|
name: minimum dependency versions
|
2022-11-24 14:34:30 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2024-04-14 17:44:01 +00:00
|
|
|
- uses: actions/checkout@v4
|
2024-10-28 08:01:52 +00:00
|
|
|
- name: Install uv
|
|
|
|
uses: astral-sh/setup-uv@v3
|
2022-11-24 14:34:30 +00:00
|
|
|
with:
|
2024-10-28 08:01:52 +00:00
|
|
|
enable-cache: true
|
2024-10-31 18:44:41 +00:00
|
|
|
- name: Install Python 3.10
|
|
|
|
run: uv python install 3.10
|
2022-11-24 15:09:47 +00:00
|
|
|
- name: Install apt dependencies
|
2024-04-27 08:10:45 +00:00
|
|
|
run: |
|
|
|
|
sudo apt update
|
|
|
|
sudo DEBIAN_FRONTEND=noninteractive apt --yes --quiet install apparmor-utils libsasl2-dev python3-dev libldap2-dev libssl-dev slapd ldap-utils
|
2022-11-24 15:09:47 +00:00
|
|
|
- name: App armor configuration for slapd
|
2024-04-27 08:10:45 +00:00
|
|
|
if: ${{ !env.ACT }}
|
2022-11-24 15:09:47 +00:00
|
|
|
run: sudo aa-complain /usr/sbin/slapd
|
2024-10-28 08:01:52 +00:00
|
|
|
- name: Run tests
|
2024-05-08 07:37:25 +00:00
|
|
|
run: |
|
2024-04-27 08:10:45 +00:00
|
|
|
# python tzinfo fails on 'act' without this
|
|
|
|
ulimit -n 1024
|
|
|
|
export TZ=UTC
|
2024-11-06 19:13:16 +00:00
|
|
|
uv sync --all-extras --resolution=lowest-direct
|
2025-01-02 22:54:10 +00:00
|
|
|
uv run pytest --numprocesses auto
|
2024-10-28 08:01:52 +00:00
|
|
|
|
2023-08-13 11:10:27 +00:00
|
|
|
style:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2024-11-07 10:35:54 +00:00
|
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Install uv
|
|
|
|
uses: astral-sh/setup-uv@v3
|
|
|
|
with:
|
|
|
|
enable-cache: true
|
|
|
|
- name: Run linters
|
|
|
|
run: |
|
2024-11-07 10:45:59 +00:00
|
|
|
sudo apt update
|
|
|
|
sudo DEBIAN_FRONTEND=noninteractive apt --yes --quiet install apparmor-utils libsasl2-dev python3-dev libldap2-dev libssl-dev slapd ldap-utils
|
|
|
|
- name: App armor configuration for slapd
|
|
|
|
if: ${{ !env.ACT }}
|
|
|
|
run: sudo aa-complain /usr/sbin/slapd
|
|
|
|
- name: Run tests
|
|
|
|
run: |
|
|
|
|
# python tzinfo fails on 'act' without this
|
|
|
|
ulimit -n 1024
|
|
|
|
export TZ=UTC
|
2024-11-07 10:35:54 +00:00
|
|
|
uv sync --all-extras
|
|
|
|
uv run pre-commit run --all-files
|
2024-10-28 08:01:52 +00:00
|
|
|
|
2022-11-24 14:34:30 +00:00
|
|
|
doc:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2024-04-14 17:44:01 +00:00
|
|
|
- uses: actions/checkout@v4
|
2024-10-28 08:01:52 +00:00
|
|
|
- name: Install uv
|
|
|
|
uses: astral-sh/setup-uv@v3
|
2022-11-24 14:34:30 +00:00
|
|
|
with:
|
2024-10-28 08:01:52 +00:00
|
|
|
enable-cache: true
|
2022-11-24 15:09:47 +00:00
|
|
|
- name: Install apt dependencies
|
2024-04-27 08:10:45 +00:00
|
|
|
run: |
|
|
|
|
sudo apt update
|
|
|
|
sudo DEBIAN_FRONTEND=noninteractive apt --yes --quiet install libsasl2-dev python3-dev libldap2-dev libssl-dev slapd ldap-utils
|
|
|
|
- run: |
|
|
|
|
export TZ=UTC
|
2024-12-19 09:40:06 +00:00
|
|
|
uv sync --group doc --all-extras
|
2024-12-05 10:03:26 +00:00
|
|
|
uv run sphinx-build doc build/sphinx/html --fail-on-warning
|