-
-
Notifications
You must be signed in to change notification settings - Fork 0
146 lines (120 loc) · 3.95 KB
/
ci.yml
File metadata and controls
146 lines (120 loc) · 3.95 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
name: Code Quality
on:
push:
branches: [ main, master, develop ]
pull_request:
branches: [ main, master, develop ]
jobs:
syntax-check:
runs-on: windows-latest
name: Python Syntax Check
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Check Python syntax
run: python .github/scripts/syntax_check.py
lint-check:
runs-on: windows-latest
name: Code Linting
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install linters
run: |
python -m pip install --upgrade pip
pip install pyflakes
- name: Run pyflakes
shell: pwsh
run: |
echo "Running pyflakes..."
pyflakes main.py
pyflakes core/overlay.py
pyflakes core/input_mon.py
pyflakes core/settings_manager.py
pyflakes core/configuration.py
pyflakes core/gui.py
pyflakes core/logging_config.py
pyflakes core/ui/components.py
echo "No linting errors found"
import-check:
runs-on: windows-latest
name: Import Validation
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pynput pywin32 PySide6
- name: Test imports
shell: pwsh
run: |
echo "Testing module imports..."
python -c "import main; print('main.py imports successfully')"
python -c "import core.overlay; print('core.overlay imports successfully')"
python -c "import core.input_mon; print('core.input_mon imports successfully')"
python -c "import core.settings_manager; print('core.settings_manager imports successfully')"
python -c "import core.configuration; print('core.configuration imports successfully')"
python -c "import core.gui; print('core.gui imports successfully')"
python -c "import core.ui.components; print('core.ui.components imports successfully')"
python -c "import core.logging_config; print('core.logging_config imports successfully')"
type-check:
runs-on: windows-latest
name: Type Validation
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Check type hints
shell: pwsh
run: python .github/scripts/type_check.py
config-validation:
runs-on: windows-latest
name: Configuration Validation
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pynput pywin32 PySide6
- name: Validate config schema
shell: pwsh
run: python .github/scripts/config_validation.py
summary:
runs-on: windows-latest
name: Quality Summary
needs: [syntax-check, lint-check, import-check, type-check, config-validation]
steps:
- name: All checks passed
run: |
echo "## Quality Summary"
echo ""
echo "| Check | Status |"
echo "|-------|--------|"
echo "| Python Syntax | Passed |"
echo "| Linting | Passed |"
echo "| Imports | Passed |"
echo "| Type Hints | Passed |"
echo "| Config Validation | Passed |"
echo ""
echo "All quality checks passed successfully!"