From 3d02137bfb6faea7b4266acb5cc12de915f548bb Mon Sep 17 00:00:00 2001 From: Dmitrii Bykov Date: Sun, 24 May 2026 14:36:38 +0300 Subject: [PATCH] =?UTF-8?q?ci:=20Forgejo=20Actions=20workflow=20=D0=B4?= =?UTF-8?q?=D0=BB=D1=8F=20Godot=204.6.3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit При push на main: - Скачивает Godot 4.6.3 headless Linux - godot --import (проверка валидности проекта) - godot --quit-after 30 (smoke-тест main.tscn) - Проверка отсутствия SCRIPT ERROR / Parse Error в логах - Проверка что main.gd напечатал boot-сообщение --- .forgejo/workflows/build.yml | 62 ++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 .forgejo/workflows/build.yml diff --git a/.forgejo/workflows/build.yml b/.forgejo/workflows/build.yml new file mode 100644 index 0000000..7e8401f --- /dev/null +++ b/.forgejo/workflows/build.yml @@ -0,0 +1,62 @@ +name: Godot CI + +on: + push: + branches: [main] + pull_request: + branches: [main] + workflow_dispatch: + +env: + GODOT_VERSION: "4.6.3" + +jobs: + validate: + name: Import + smoke test + runs-on: docker + container: + image: ubuntu:22.04 + steps: + - name: Install deps + run: | + apt-get update -qq + apt-get install -y -qq wget unzip ca-certificates git + rm -rf /var/lib/apt/lists/* + + - name: Checkout + uses: actions/checkout@v4 + + - name: Download Godot ${{ env.GODOT_VERSION }} headless + run: | + cd /tmp + wget -q "https://github.com/godotengine/godot/releases/download/${GODOT_VERSION}-stable/Godot_v${GODOT_VERSION}-stable_linux.x86_64.zip" + unzip -q "Godot_v${GODOT_VERSION}-stable_linux.x86_64.zip" + mv "Godot_v${GODOT_VERSION}-stable_linux.x86_64" /usr/local/bin/godot + chmod +x /usr/local/bin/godot + godot --version + + - name: Import project + run: | + godot --headless --import 2>&1 | tee /tmp/import.log + if grep -E "SCRIPT ERROR|Parse Error|^ERROR" /tmp/import.log; then + echo "::error::Import has errors" + exit 1 + fi + + - name: Smoke test main scene (30 frames) + run: | + godot --headless --quit-after 30 2>&1 | tee /tmp/run.log + if grep -E "SCRIPT ERROR|Parse Error|^ERROR" /tmp/run.log; then + echo "::error::Runtime has errors" + exit 1 + fi + if ! grep -q "Farming Simulator pre-alpha" /tmp/run.log; then + echo "::error::Expected boot message not found" + exit 1 + fi + + - name: Summary + run: | + echo "✅ Project imports cleanly" + echo "✅ Main scene boots without errors" + echo "✅ Expected viewport: 640x360"