-
Notifications
You must be signed in to change notification settings - Fork 3
80 lines (61 loc) · 1.61 KB
/
main.yml
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
78
79
80
name: Test
on:
push:
paths:
- .github/workflows/main.yml
- pyproject.toml
- keywin/**
- tests/**
jobs:
type-check:
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/[email protected]
- name: Setup PDM
uses: pdm-project/[email protected]
with:
python-version: '*'
cache: true
- name: Install dependencies
run: pdm install
- name: Run typechecker
run: pdm run pyright
lint:
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/[email protected]
- name: Setup PDM
uses: pdm-project/[email protected]
with:
python-version: '*'
cache: true
- name: Install dependencies
run: pdm install
- name: Run linter
run: pdm run pylint --ignore-paths=.venv --recursive=y .
test:
runs-on: windows-latest
strategy:
matrix:
python-version: [3.9, '3.10', 3.11, 3.12, 3.13]
steps:
- name: Checkout repository
uses: actions/[email protected]
- name: Setup PDM
uses: pdm-project/[email protected]
with:
python-version: ${{ matrix.python-version }}
cache: true
- name: Install dependencies
run: pdm install
- name: Run tests
run: pdm run pytest
install:
runs-on: windows-latest
steps:
- name: Install KeyWin
run: pip install git+https://github.com/winstxnhdw/KeyWin
- name: Mini smoke test
run: python -c "from keywin import *; keyboard.press(0x5B, 0x44)"