mirror of
https://github.com/kuhyx/utils.git
synced 2026-11-28 08:29:19 +01:00
Bug-class-check: none — gate policy change (kuhy 2026-11-27) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WzxdWZDq7ef5JyQd7Rx3Ju
92 lines
3.1 KiB
YAML
92 lines
3.1 KiB
YAML
name: kuhy_credit tests
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
paths: ['kuhy_credit/**', 'flutter_web_drive/**', '.github/workflows/kuhy-credit-tests.yml']
|
|
pull_request:
|
|
branches: [main]
|
|
paths: ['kuhy_credit/**', 'flutter_web_drive/**', '.github/workflows/kuhy-credit-tests.yml']
|
|
|
|
env:
|
|
GODOT_VERSION: "4.7.2"
|
|
|
|
jobs:
|
|
python:
|
|
runs-on: ubuntu-latest
|
|
defaults:
|
|
run:
|
|
working-directory: kuhy_credit
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-python@v5
|
|
with: { python-version: "3.15.2" }
|
|
- name: Install the package, pytest and a virtual X display
|
|
run: |
|
|
sudo apt-get update && sudo apt-get install -y xvfb python3-tk \
|
|
texlive-latex-base texlive-latex-recommended texlive-pictures
|
|
pip install -r requirements-dev.txt && pip install --no-deps -e .
|
|
- name: Tests, Tk E2E and the drift check
|
|
run: xvfb-run -a -s "-screen 0 1600x1200x24" python -m pytest -q
|
|
|
|
web:
|
|
runs-on: ubuntu-latest
|
|
defaults:
|
|
run:
|
|
working-directory: kuhy_credit/web
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: pnpm/action-setup@v4
|
|
with: { version: 12 }
|
|
- uses: actions/setup-node@v4
|
|
with: { node-version: "26.13.1" }
|
|
- uses: actions/setup-python@v5
|
|
with: { python-version: "3.15.2" }
|
|
- run: pnpm install --frozen-lockfile
|
|
- name: Unit tests
|
|
run: pnpm test
|
|
- name: E2E in headless Chrome (window.open stubbed)
|
|
working-directory: .
|
|
env: { CHROMIUM: google-chrome }
|
|
run: |
|
|
pip install -r flutter_web_drive/requirements.txt
|
|
python3 kuhy_credit/e2e/web_e2e.py
|
|
|
|
flutter:
|
|
runs-on: ubuntu-latest
|
|
defaults:
|
|
run:
|
|
working-directory: kuhy_credit/flutter
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: subosito/flutter-action@v2
|
|
with: { channel: stable }
|
|
- uses: actions/setup-python@v5
|
|
with: { python-version: "3.15.2" }
|
|
- run: flutter pub get
|
|
- name: Widget tests
|
|
run: flutter test
|
|
- name: Example web build + E2E in headless Chrome (window.open stubbed)
|
|
env: { CHROMIUM: google-chrome }
|
|
run: |
|
|
(cd example && flutter pub get && flutter build web --release)
|
|
pip install -r ../../flutter_web_drive/requirements.txt
|
|
python3 ../e2e/flutter_web_e2e.py
|
|
|
|
godot:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-python@v5
|
|
with: { python-version: "3.15.2" }
|
|
- name: Install Godot
|
|
run: |
|
|
curl -fsSL -o godot.zip "https://github.com/godotengine/godot/releases/download/${GODOT_VERSION}-stable/Godot_v${GODOT_VERSION}-stable_linux.x86_64.zip"
|
|
unzip -q godot.zip
|
|
chmod +x "Godot_v${GODOT_VERSION}-stable_linux.x86_64"
|
|
sudo mv "Godot_v${GODOT_VERSION}-stable_linux.x86_64" /usr/local/bin/godot
|
|
rm godot.zip
|
|
- name: GUT unit tests + demo E2E (GUT fetched at its pinned tag)
|
|
env: { KUHY_CREDIT_GODOT_TIMEOUT: "50" }
|
|
run: kuhy_credit/godot/test.sh
|