Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
100 changes: 100 additions & 0 deletions .github/workflows/playgodot-integration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
# Run PlayGodot integration tests against the automation build
# This validates that the automation protocol works correctly

name: PlayGodot Integration Tests

on:
workflow_run:
workflows: ["🔗 GHA"]
types: [completed]
Comment on lines 6 to 9

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Point workflow_run to an existing automation build

The workflow_run trigger is configured to listen for a workflow named "Build Godot Automation" (and the download step later refers to build-automation.yml), but this repository contains no workflow by that name (rg "Build Godot Automation" .github/workflows returns none). As a result this job will never auto-trigger on automation builds and the artifact download will have nothing to fetch, so the PlayGodot integration tests will not run after the intended build pipeline.

Useful? React with 👍 / 👎.

branches: [automation]
workflow_dispatch:

jobs:
test-integration:
# Only run if the build succeeded
if: ${{ github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-22.04
name: PlayGodot Integration Tests

steps:
- name: Download Godot artifact
uses: dawidd6/action-download-artifact@v6
with:
workflow: runner.yml
workflow_conclusion: success
name: linux-editor-mono
path: godot-bin
# Use run_id from the triggering workflow, or latest for manual trigger
run_id: ${{ github.event.workflow_run.id }}
if_no_artifact_found: warn

- name: Fallback - Download from latest successful run
if: failure() || hashFiles('godot-bin/godot.*') == ''
uses: dawidd6/action-download-artifact@v6
with:
workflow: runner.yml
workflow_conclusion: success
name: linux-editor-mono
path: godot-bin
search_artifacts: true

- name: Setup Godot
run: |
ls -la godot-bin/ || echo "No godot-bin directory"
chmod +x godot-bin/godot.* || true

# Find the godot binary
GODOT_BIN=$(find godot-bin -name 'godot.*' -type f | head -1)
if [ -z "$GODOT_BIN" ]; then
echo "No Godot binary found, skipping tests"
exit 0
fi

sudo mv "$GODOT_BIN" /usr/local/bin/godot
godot --version

- name: Install display dependencies
run: |
sudo apt-get update
sudo apt-get install -y xvfb

- name: Checkout PlayGodot
uses: actions/checkout@v4
with:
repository: Randroids-Dojo/PlayGodot
path: playgodot

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.11'

- name: Install PlayGodot
run: |
cd playgodot/python
pip install -e ".[dev]"

- name: Run unit tests
run: |
cd playgodot/python
pytest tests/ -v --tb=short

- name: Run tic-tac-toe integration tests
run: |
cd playgodot/examples/tic-tac-toe
# Run with xvfb for headless display
xvfb-run -a pytest tests/ -v --tb=short
env:
GODOT_PATH: /usr/local/bin/godot

- name: Test results summary
if: always()
run: |
echo "## PlayGodot Integration Test Results" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
if [ "${{ job.status }}" == "success" ]; then
echo "✅ All integration tests passed!" >> $GITHUB_STEP_SUMMARY
else
echo "❌ Some tests failed. Check the logs above for details." >> $GITHUB_STEP_SUMMARY
fi
Loading