name: CI on: push: branches: [main] pull_request: jobs: headless-tests: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Install Godot 4.3 run: | curl -sL -o /tmp/godot.zip \ https://github.com/godotengine/godot/releases/download/4.3-stable/Godot_v4.3-stable_linux.x86_64.zip unzip -o /tmp/godot.zip -d /tmp/godot-bin sudo install /tmp/godot-bin/Godot_v4.3-stable_linux.x86_64 /usr/local/bin/godot - name: Cache .godot import artifacts uses: actions/cache@v4 with: path: .godot key: godot-import-${{ hashFiles('project.godot', 'src/**/*.gd') }} - name: Import project (build class cache) run: godot --headless --import || true - name: Run headless test suite run: | set +e output=$(godot --headless --path . --script res://src/test/test_runner.gd 2>&1) status=$? echo "$output" if [ $status -ne 0 ]; then echo "::error::Headless tests failed" exit 1 fi if echo "$output" | grep -q "SCRIPT ERROR"; then echo "::error::Script errors detected" exit 1 fi exit 0