Skip to content

docs: restructure README and consolidate documentation #7

docs: restructure README and consolidate documentation

docs: restructure README and consolidate documentation #7

Workflow file for this run

name: Godot Headless Tests
on:
push:
pull_request:
env:
GODOT_VERSION: 4.6
GODOT_BINARY: godot_headless
jobs:
validate:
name: Validate project load
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Restore cached Godot
id: cache-godot
uses: actions/cache@v4
with:
path: ${{ env.GODOT_BINARY }}
key: ${{ runner.os }}-godot-${{ env.GODOT_VERSION }}
- name: Download Godot headless
if: steps.cache-godot.outputs.cache-hit != 'true'
run: |
curl -sL "https://github.com/godotengine/godot/releases/download/${{ env.GODOT_VERSION }}-stable/Godot_v${{ env.GODOT_VERSION }}-stable_linux_headless.64.zip" -o godot.zip
unzip godot.zip
mv Godot_v${{ env.GODOT_VERSION }}-stable_linux_headless.64 ${{ env.GODOT_BINARY }}
chmod +x ${{ env.GODOT_BINARY }}
- name: Make Godot executable (cached)
if: steps.cache-godot.outputs.cache-hit == 'true'
run: chmod +x ${{ env.GODOT_BINARY }}
- name: Validate project.godot loads
run: |
./${{ env.GODOT_BINARY }} --headless --path . --quit 2>&1 | tee validate.log
- name: Upload validate log
if: always()
uses: actions/upload-artifact@v4
with:
name: validate-log
path: validate.log
test:
name: ${{ matrix.label }}
needs: validate
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- label: SmokeTest
script: SmokeTestRunner.gd
checks: 218
- label: StartMenu
script: StartMenuSceneTestRunner.gd
checks: 55
- label: GameHUD
script: GameHUDSceneTestRunner.gd
checks: 27
- label: EventRoulette
script: EventRouletteSceneTestRunner.gd
checks: 14
- label: SettingsPanel
script: SettingsPanelSceneTestRunner.gd
checks: 9
- label: GameStateCoordinator
script: GameStateCoordinatorTestRunner.gd
checks: 50
- label: SaveFlow
script: SaveFlowControllerTestRunner.gd
checks: 190
- label: RestorePlan
script: RestorePlanTestRunner.gd
checks: 11
- label: Integration
script: IntegrationTestRunner.gd
checks: 133
- label: LayoutSanity
script: LayoutSanityTestRunner.gd
checks: 376
steps:
- uses: actions/checkout@v4
- name: Restore cached Godot
id: cache-godot
uses: actions/cache@v4
with:
path: ${{ env.GODOT_BINARY }}
key: ${{ runner.os }}-godot-${{ env.GODOT_VERSION }}
- name: Download Godot headless
if: steps.cache-godot.outputs.cache-hit != 'true'
run: |
curl -sL "https://github.com/godotengine/godot/releases/download/${{ env.GODOT_VERSION }}-stable/Godot_v${{ env.GODOT_VERSION }}-stable_linux_headless.64.zip" -o godot.zip
unzip godot.zip
mv Godot_v${{ env.GODOT_VERSION }}-stable_linux_headless.64 ${{ env.GODOT_BINARY }}
chmod +x ${{ env.GODOT_BINARY }}
- name: Make Godot executable (cached)
if: steps.cache-godot.outputs.cache-hit == 'true'
run: chmod +x ${{ env.GODOT_BINARY }}
- name: Run ${{ matrix.label }}
run: |
./${{ env.GODOT_BINARY }} --headless --path . --script res://scripts/tests/${{ matrix.script }} 2>&1 | tee test_output.log
tail -5 test_output.log
- name: Check test result
run: |
if grep -q "PASS" test_output.log; then
echo "✅ ${{ matrix.label }} passed"
elif grep -q "FAIL" test_output.log; then
echo "❌ ${{ matrix.label }} failed"
exit 1
else
echo "⚠️ ${{ matrix.label }} did not produce a PASS/FAIL result"
exit 1
fi
- name: Upload ${{ matrix.label }} log
if: always()
uses: actions/upload-artifact@v4
with:
name: test-log-${{ matrix.label }}
path: test_output.log