Check supported Python versions

Signed-off-by: Loren Eteval <loren.eteval@proton.me>
This commit is contained in:
Loren Eteval
2026-10-07 18:10:50 +08:00
parent 2af7dd5587
commit 9c7a466536
4 changed files with 114 additions and 22 deletions
+6 -3
View File
@@ -57,9 +57,12 @@ Read `.github/workflows/deploy-pypi.yml` with `tests/README.md`; paths are relat
- Validate YAML and every affected expression/shell. Trace each changed matrix row through dependency installation,
source/native import checks, Nuitka/installer output, packaged architecture/dependency checks, artifact upload, and tag
gates. When a target cannot run locally, add a narrow CI assertion that fails before publication with a useful reason.
- `workflows/source-tests.yml` runs isolated source unittest discovery on Windows, Linux, and macOS and is a
required dependency of PyPI publication through `workflows/deploy-pypi.yml`. It can also run manually. Hourly binary
builds retain their separate artifact scope. Source tests do not establish packaged behavior or Python/Qt
- `workflows/source-tests.yml` separates full cross-platform source unittest discovery from focused Linux
interpreter-version checks. The latter use compatible Qt/native wheel pins, dependency consistency, native-binding
imports without starting runtimes, application compilation, cold imports and real compatibility behavior. These
checks do not certify the entire suite on every version.
The reusable workflow is a required dependency of PyPI publication through `workflows/deploy-pypi.yml`, so its
version matrix must also pass. It can run manually. Hourly binary builds retain their separate artifact scope. Source tests do not establish packaged behavior or Python/Qt
floors beyond their matrix. Do not call an artifact build a regression-test pass; use `tests/README.md` for
source verification. The source suite's offscreen Qt environment exercises widgets and event delivery, not native
tray integration, privilege prompts, or an installed application's host effects. Follow actual `needs` and tag gates
+54
View File
@@ -31,3 +31,57 @@ jobs:
run: python -m pip install -r requirements.txt "PySide6-Essentials==6.8.3" "PySide6-Addons==6.8.3"
- name: Run isolated behavioral and resource tests
run: python -m unittest discover -s tests -v
python-compatibility:
name: Python ${{ matrix.python }} compatibility
runs-on: ubuntu-22.04
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
include:
- python: "3.8"
pyside6: "6.6.3.1"
- python: "3.9"
pyside6: "6.8.3"
- python: "3.10"
pyside6: "6.8.3"
- python: "3.11"
pyside6: "6.8.3"
- python: "3.12"
pyside6: "6.8.3"
- python: "3.13"
pyside6: "6.8.3"
- python: "3.14"
pyside6: "6.10.3"
env:
QT_QPA_PLATFORM: offscreen
PYTHONUTF8: "1"
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v7
with:
python-version: ${{ matrix.python }}
- name: Install Linux Qt runtime libraries
run: sudo apt-get update && sudo apt-get install -y libegl1 libopengl0
- name: Install interpreter-compatible dependencies
run: >-
python -m pip install --only-binary=:all: -r requirements.txt
"PySide6-Essentials==${{ matrix.pyside6 }}"
"PySide6-Addons==${{ matrix.pyside6 }}"
"zxing-cpp==2.2.0; python_version == '3.8'"
- name: Check installed dependency consistency
run: python -m pip check
- name: Check native binding imports without starting runtimes
run: |
python - <<'PY'
from importlib import import_module
for name in ('xray', 'hysteria', 'hysteria2', 'tun2socks', 'sing_tun'):
import_module(name)
print('Native binding imports passed; no runtime or TUN started')
PY
- name: Compile application source on this interpreter
run: python -m compileall -q Furious Translation.py
- name: Check cold imports and compatibility behavior
run: python -m unittest tests.test_public_api tests.test_python_compatibility -v