Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QPgKvy5W9WRNFHjkm5QsHx
82 lines
3.1 KiB
YAML
82 lines
3.1 KiB
YAML
name: Tests
|
|
|
|
on:
|
|
push:
|
|
pull_request:
|
|
schedule:
|
|
- cron: "0 3 * * *"
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
headless:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Godot laden
|
|
run: |
|
|
curl -sSL -o godot.zip https://github.com/godotengine/godot/releases/download/4.7.2-stable/Godot_v4.7.2-stable_linux.x86_64.zip
|
|
unzip -q godot.zip
|
|
mv Godot_v4.7.2-stable_linux.x86_64 godot
|
|
chmod +x godot
|
|
- name: Statische Prüfung und Tests
|
|
run: ./tests/run_headless.sh ./godot
|
|
|
|
fenster-schnell:
|
|
if: github.event_name != 'schedule'
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Godot und Xvfb laden
|
|
run: |
|
|
curl -sSL -o godot.zip https://github.com/godotengine/godot/releases/download/4.7.2-stable/Godot_v4.7.2-stable_linux.x86_64.zip
|
|
unzip -q godot.zip
|
|
mv Godot_v4.7.2-stable_linux.x86_64 godot
|
|
chmod +x godot
|
|
sudo apt-get update -qq && sudo apt-get install -y -qq xvfb libgl1 libegl1
|
|
- name: Import
|
|
run: ./godot --headless --path . --import || true
|
|
- name: Fenster-Test (schnell)
|
|
run: DINGER_FAST=1 xvfb-run -a --server-args="-screen 0 1280x800x24" ./godot --path . tests/ui_test.tscn 2>&1 | tee fenster.log | grep -E "FEHLER|Prüfungen" || true
|
|
- name: Ergebnis
|
|
run: grep -q " 0 fehlgeschlagen" fenster.log
|
|
|
|
fenster-voll:
|
|
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Godot und Xvfb laden
|
|
run: |
|
|
curl -sSL -o godot.zip https://github.com/godotengine/godot/releases/download/4.7.2-stable/Godot_v4.7.2-stable_linux.x86_64.zip
|
|
unzip -q godot.zip
|
|
mv Godot_v4.7.2-stable_linux.x86_64 godot
|
|
chmod +x godot
|
|
sudo apt-get update -qq && sudo apt-get install -y -qq xvfb libgl1 libegl1
|
|
- name: Import
|
|
run: ./godot --headless --path . --import || true
|
|
- name: Fenster-Test (voll, mit Netzwerk und Hotseat)
|
|
run: xvfb-run -a --server-args="-screen 0 1280x800x24" ./godot --path . tests/ui_test.tscn 2>&1 | tee fenster.log | grep -E "FEHLER|Prüfungen" || true
|
|
- name: Ergebnis
|
|
run: grep -q " 0 fehlgeschlagen" fenster.log
|
|
|
|
balance:
|
|
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Godot laden
|
|
run: |
|
|
curl -sSL -o godot.zip https://github.com/godotengine/godot/releases/download/4.7.2-stable/Godot_v4.7.2-stable_linux.x86_64.zip
|
|
unzip -q godot.zip
|
|
mv Godot_v4.7.2-stable_linux.x86_64 godot
|
|
chmod +x godot
|
|
- name: Import
|
|
run: ./godot --headless --path . --import || true
|
|
- name: Archetypen messen
|
|
run: ./godot --headless --path . -s tests/strength_probe.gd 2>&1 | grep -E "%|geschrieben"
|
|
- name: Ergebnis sichern
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: archetypen
|
|
path: data/archetypen.json
|