@@ -23,15 +23,15 @@ jobs:
2323 - name : Install dependencies
2424 run : |
2525 python -m pip install --upgrade pip
26- pip install -r requirements.txt
26+ pip install PySide6
2727
2828 - name : Check Python syntax
2929 run : |
3030 echo "Checking Python syntax..."
3131 python -m py_compile main.py
3232 python -c "import os, py_compile; [py_compile.compile(os.path.join(dp, f), doraise=True) for dp, dn, files in os.walk('core') if f.endswith('.py')]"
3333 python -c "import os, py_compile; [py_compile.compile(os.path.join(dp, f), doraise=True) for dp, dn, files in os.walk('core/ui') if f.endswith('.py')]"
34- echo "✅ All files compile successfully"
34+ echo "All files compile successfully"
3535
3636 lint-check :
3737 runs-on : windows-latest
@@ -52,12 +52,18 @@ jobs:
5252 pip install pyflakes
5353
5454 - name : Run pyflakes
55+ shell : pwsh
5556 run : |
5657 echo "Running pyflakes..."
5758 pyflakes main.py
58- pyflakes core/*.py
59- pyflakes core/ui/*.py
60- echo "✅ No linting errors found"
59+ pyflakes core/overlay.py
60+ pyflakes core/input_mon.py
61+ pyflakes core/settings_manager.py
62+ pyflakes core/configuration.py
63+ pyflakes core/gui.py
64+ pyflakes core/logging_config.py
65+ pyflakes core/ui/components.py
66+ echo "No linting errors found"
6167
6268 import-check :
6369 runs-on : windows-latest
@@ -72,17 +78,23 @@ jobs:
7278 with :
7379 python-version : ' 3.10'
7480
81+ - name : Install dependencies
82+ run : |
83+ python -m pip install --upgrade pip
84+ pip install PySide6
85+
7586 - name : Test imports
87+ shell : pwsh
7688 run : |
7789 echo "Testing module imports..."
78- python -c "import main; print('✅ main.py imports successfully')"
79- python -c "import core.overlay; print('✅ core.overlay imports successfully')"
80- python -c "import core.input_mon; print('✅ core.input_mon imports successfully')"
81- python -c "import core.settings_manager; print('✅ core.settings_manager imports successfully')"
82- python -c "import core.configuration; print('✅ core.configuration imports successfully')"
83- python -c "import core.gui; print('✅ core.gui imports successfully')"
84- python -c "import core.ui.components; print('✅ core.ui.components imports successfully')"
85- python -c "import core.logging_config; print('✅ core.logging_config imports successfully')"
90+ python -c "import main; print('main.py imports successfully')"
91+ python -c "import core.overlay; print('core.overlay imports successfully')"
92+ python -c "import core.input_mon; print('core.input_mon imports successfully')"
93+ python -c "import core.settings_manager; print('core.settings_manager imports successfully')"
94+ python -c "import core.configuration; print('core.configuration imports successfully')"
95+ python -c "import core.gui; print('core.gui imports successfully')"
96+ python -c "import core.ui.components; print('core.ui.components imports successfully')"
97+ python -c "import core.logging_config; print('core.logging_config imports successfully')"
8698
8799 type-check :
88100 runs-on : windows-latest
@@ -98,81 +110,15 @@ jobs:
98110 python-version : ' 3.10'
99111
100112 - name : Check type hints
113+ shell : pwsh
101114 run : |
102115 echo "Checking for type annotation issues..."
103- python -c "
104- import ast
105- import sys
106-
107- def check_file(filepath):
108- with open(filepath, 'r', encoding='utf-8') as f:
109- try:
110- tree = ast.parse(f, filepath)
111- except SyntaxError as e:
112- print(f'❌ {filepath}: {e}')
113- return False
114- return True
115-
116- files_to_check = ['main.py', 'core/overlay.py', 'core/input_mon.py',
117- 'core/settings_manager.py', 'core/configuration.py',
118- 'core/gui.py', 'core/ui/components.py']
119-
120- all_ok = True
121- for filepath in files_to_check:
122- if check_file(filepath):
123- print(f'✅ {filepath} type hints valid')
124- else:
125- all_ok = False
126-
127- if not all_ok:
128- sys.exit(1)
129- "
116+ python -c "import ast, sys; files_to_check = ['main.py', 'core/overlay.py', 'core/input_mon.py', 'core/settings_manager.py', 'core/configuration.py', 'core/gui.py', 'core/ui/components.py']; all_ok = True; exec(open('type_check.py', 'w').write('import ast, sys\n\ndef check_file(filepath):\n with open(filepath, 'r', encoding='utf-8') as f:\n try:\n tree = ast.parse(f, filepath)\n except SyntaxError as e:\n print(f\"ERROR {filepath}: {e}\")\n return False\n return True\n\nfiles_to_check = \"' + \"', '\".join(files_to_check) + '\")\n\nall_ok = True\nfor filepath in files_to_check:\n if check_file(filepath):\n print(f\"OK {filepath} type hints valid\")\n else:\n all_ok = False\n\nif not all_ok:\n sys.exit(1)\n')); exec(open('type_check.py').read()); python type_check.py"
130117
131118 config-validation :
132119 runs-on : windows-latest
133120 name : Configuration Validation
134121
135- steps :
136- - name : Checkout code
137- uses : actions/checkout@v4
138-
139- - name : Set up Python
140- uses : actions/setup-python@v4
141- with :
142- python-version : ' 3.10'
143-
144- - name : Validate config schema
145- run : |
146- echo "Testing configuration validation..."
147- python -c "
148- from core.settings_manager import SettingsManager
149- from core.configuration import AppConfig
150-
151- # Test default config
152- config = AppConfig()
153- print('✅ Default configuration created successfully')
154-
155- # Test schema validation
156- settings = SettingsManager()
157- print('✅ Schema validation passed')
158-
159- # Test config save
160- import tempfile
161- import os
162- temp_config = tempfile.mktemp(suffix='.ini')
163- try:
164- settings.filename = temp_config
165- settings.save()
166- print('✅ Config save works correctly')
167- finally:
168- if os.path.exists(temp_config):
169- os.remove(temp_config)
170- "
171-
172- build-test :
173- runs-on : windows-latest
174- name : Windows Build Test
175-
176122 steps :
177123 - name : Checkout code
178124 uses : actions/checkout@v4
@@ -185,21 +131,13 @@ jobs:
185131 - name : Install dependencies
186132 run : |
187133 python -m pip install --upgrade pip
188- pip install -r requirements.txt
189- pip install pyinstaller
134+ pip install PySide6
190135
191- - name : Test build
136+ - name : Validate config schema
137+ shell : pwsh
192138 run : |
193- echo "Testing PyInstaller build..."
194- pyinstaller --onefile --noconfirm --clean --name RainingKeysPython main.py
195- if exist "RainingKeysPython.exe" (
196- echo "✅ Build successful"
197- rmdir /s /q build dist
198- ) else (
199- echo "❌ Build failed"
200- exit 1
201- )
202- shell : cmd
139+ echo "Testing configuration validation..."
140+ python -c "from core.settings_manager import SettingsManager; from core.configuration import AppConfig; config = AppConfig(); print('Default configuration created successfully'); settings = SettingsManager(); print('Schema validation passed')"
203141
204142 summary :
205143 runs-on : windows-latest
@@ -209,14 +147,14 @@ jobs:
209147 steps :
210148 - name : All checks passed
211149 run : |
212- echo "## ✅ Code Quality Summary"
150+ echo "## Quality Summary"
213151 echo ""
214152 echo "| Check | Status |"
215153 echo "|-------|--------|"
216- echo "| Python Syntax | ✅ Passed |"
217- echo "| Linting | ✅ Passed |"
218- echo "| Imports | ✅ Passed |"
219- echo "| Type Hints | ✅ Passed |"
220- echo "| Config Validation | ✅ Passed |"
154+ echo "| Python Syntax | Passed |"
155+ echo "| Linting | Passed |"
156+ echo "| Imports | Passed |"
157+ echo "| Type Hints | Passed |"
158+ echo "| Config Validation | Passed |"
221159 echo ""
222- echo "All quality checks passed successfully! 🎉 "
160+ echo "All quality checks passed successfully!"
0 commit comments