ci: add automated test workflow

This commit is contained in:
chengma
2026-07-02 16:28:04 +08:00
parent e52da68835
commit c404d1dd11
6 changed files with 52 additions and 7 deletions
+34
View File
@@ -0,0 +1,34 @@
name: Tests
on:
push:
pull_request:
jobs:
test:
name: Python 3.11 / Windows
runs-on: windows-latest
env:
QT_QPA_PLATFORM: offscreen
PYTHONUTF8: "1"
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: pip
cache-dependency-path: requirements.txt
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
- name: Syntax check
run: python -m compileall app main.py
- name: Unit and GUI tests
run: python -m unittest discover -s tests