Repository navigation
44 lines (36 loc) · 1.62 KB
/
Copy pathtests.yml
File metadata and controls
44 lines (36 loc) · 1.62 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
name: tests
on:
push:
branches: [main, master]
pull_request:
workflow_dispatch:
jobs:
rules-tests:
name: rules tests (${{ matrix.os }}, py${{ matrix.python-version }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [windows-latest, ubuntu-latest]
python-version: ["3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v7
with:
python-version: ${{ matrix.python-version }}
# Only the pure-Python deps. The GPU/audio stack (onnxruntime-gpu, CUDA wheels,
# sounddevice, pynput, pystray) is deliberately NOT installed here: the rules pass
# must stay importable without it.
- name: Install test dependencies
run: python -m pip install --upgrade pip -r requirements-dev.txt
# Windows runners also get the three light desktop packages, so the hotkey state machine,
# the text-injection logic and the phone API are really exercised there. They need no GPU
# and no audio device. On Linux those tests skip themselves (pytest.importorskip).
- name: Install light desktop dependencies (Windows only)
if: runner.os == 'Windows'
run: python -m pip install "numpy==2.5.2; python_version >= '3.12'" "numpy==2.4.6; python_version < '3.12'" pynput==1.8.2 pyperclip==1.11.0
# The whole directory, not one file: a test that is never collected protects nothing.
- name: Run tests
run: python -m pytest -q tests -rs
- name: Check config.example.yaml matches the built-in defaults
run: python -m tests.check_example_config