-
Notifications
You must be signed in to change notification settings - Fork 4
61 lines (55 loc) · 1.75 KB
/
Copy pathtests.yml
File metadata and controls
61 lines (55 loc) · 1.75 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
name: tests
on:
push:
pull_request:
jobs:
windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: pip
- name: Install
run: python -m pip install -e ".[dev]"
- name: Test
run: python -m pytest -q
- name: Build wheel
run: python -m pip wheel . --no-deps -w dist
- name: Validate release metadata
shell: pwsh
run: |
$manifest = Get-Content -Raw reasonix-plugin.json | ConvertFrom-Json
$project = Get-Content -Raw pyproject.toml
if ($project -notmatch ('version\s*=\s*"' + [regex]::Escape($manifest.version) + '"')) {
throw "pyproject.toml and reasonix-plugin.json versions differ"
}
linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: pip
- name: Install system deps (X11 + AT-SPI2)
run: sudo apt-get update && sudo apt-get install -y xvfb at-spi2-core python3-gi gir1.2-atspi-2.0
- name: Install
run: python -m pip install -e ".[dev,linux]"
- name: Test (xvfb)
run: xvfb-run -a python -m pytest -q -p no:warnings
macos:
runs-on: macos-14
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: pip
- name: Install
run: python -m pip install -e ".[dev,macos]"
- name: Test
# Input injection tests are fake-based; real CGEvent/AX needs the
# Accessibility permission which CI cannot grant.
run: python -m pytest -q -p no:warnings