Repository navigation
77 lines (69 loc) · 2.27 KB
/
Copy pathci.yml
File metadata and controls
77 lines (69 loc) · 2.27 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
65
66
67
68
69
70
71
72
73
74
75
76
77
name: CI
on:
push:
branches: [main, master]
pull_request:
workflow_dispatch:
inputs:
access-integration:
description: "Also run the real-Access integration suite on a self-hosted runner"
type: boolean
default: false
permissions:
contents: read
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: astral-sh/setup-uv@v6
- run: uv sync --locked
- run: uv run ruff check .
- run: uv run ruff format --check .
typecheck:
# The COM boundary uses Windows-only modules (winreg, pywin32), so type-check on Windows.
runs-on: windows-latest
steps:
- uses: actions/checkout@v5
- uses: astral-sh/setup-uv@v6
- run: uv sync --locked
- run: uv run pyright
test:
# Unit, contract (fake backend) and CLI tests. They need neither Access nor pywin32, so they also run
# on Linux; the integration tiers are skipped without --integration.
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
python-version: ["3.11", "3.12", "3.13", "3.14"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v5
- uses: astral-sh/setup-uv@v6
- run: uv sync --locked --python ${{ matrix.python-version }}
- run: uv run --python ${{ matrix.python-version }} pytest
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: astral-sh/setup-uv@v6
- run: uv run --locked --group docs mkdocs build --strict
package:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: astral-sh/setup-uv@v6
- run: uv build
- run: uvx twine check --strict dist/*
access-integration:
# Microsoft does not support Office automation from services; run this only on a self-hosted runner in
# an interactive Windows session with Microsoft Access installed (labels are examples).
if: ${{ github.event_name == 'workflow_dispatch' && inputs.access-integration }}
runs-on: [self-hosted, windows, msaccess]
timeout-minutes: 30
steps:
- uses: actions/checkout@v5
- uses: astral-sh/setup-uv@v6
- run: uv sync --locked
- run: uv run pyaccesskit doctor --probe
- run: uv run pytest --integration