name: Automated Testing on: push: branches: - main - develop - 'feature/**' - 'patch-release' pull_request: branches: - main - develop workflow_dispatch: jobs: test: runs-on: ubuntu-latest permissions: contents: read steps: - name: Checkout Source Code uses: actions/checkout@v4 - name: Setup Godot uses: chickensoft-games/setup-godot@v1 with: version: '4.6.0' use-dotnet: false - name: Verify GUT Installation run: | if [ ! -d "addons/gut" ]; then echo "ERROR: GUT addon not found at addons/gut" exit 1 fi echo "GUT addon found" - name: Run Unit Tests run: | godot --headless --path . -s res://addons/gut/gut_cmdln.gd \ -gdir=res://tests/ \ -gexit \ -glog=2 - name: Check Test Results if: failure() run: | echo "Tests failed. Check logs above for details." exit 1 - name: Upload Test Reports if: always() uses: actions/upload-artifact@v4 with: name: test-reports path: test_reports/ retention-days: 30