-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (59 loc) · 1.88 KB
/
Copy pathci.yml
File metadata and controls
64 lines (59 loc) · 1.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: CI
on:
push:
branches: [main]
pull_request:
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
name: test (${{ matrix.os }}, py${{ matrix.python }})
runs-on: ${{ matrix.os }}
timeout-minutes: 20 # the suite runs in ~2 min; fail fast instead of hanging 6 h
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
python: ["3.11", "3.12"]
steps:
- uses: actions/checkout@v5
# PySide6 (the GUI tests, run offscreen) needs the EGL/OpenGL system
# libraries, which the ubuntu-latest image no longer preinstalls.
- name: Install Qt system libraries (Linux)
if: runner.os == 'Linux'
run: sudo apt-get update && sudo apt-get install -y libegl1 libopengl0 libgl1
- uses: astral-sh/setup-uv@v7
- name: Create environment
run: uv venv --python ${{ matrix.python }}
- name: Install
run: uv pip install -e ".[dev]"
- name: Test (GPU tests auto-skip without a device)
run: uv run pytest -q
lint:
name: lint + types
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: astral-sh/setup-uv@v7
- name: Create environment
run: uv venv --python 3.12
- name: Install
run: uv pip install -e ".[dev]"
- name: Ruff
run: uv run ruff check src tests
- name: Mypy
run: uv run mypy
docs:
name: docs build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: astral-sh/setup-uv@v7
- name: Create environment
run: uv venv --python 3.12
- name: Install
run: uv pip install -e ".[docs]"
# -W turns broken cross-references / malformed docstrings into build failures.
- name: Build (warnings are errors)
run: uv run sphinx-build -b html -W --keep-going docs docs/_build/html