farming-simulator/.forgejo/workflows/build.yml
Dmitrii Bykov f9322f8134
Some checks failed
Godot CI / Import + smoke test (push) Failing after 1m0s
ci: фикс — убрал container: ubuntu:22.04 (не имел node для actions/checkout)
Причина падения CI run #6 и #7:
actions/checkout@v4 = Node.js скрипт, ubuntu:22.04 image не имеет node, exec failed.

Фикс: runs-on: ubuntu-latest (мапится на node:20-bookworm в нашем runner-е, имеет node + Debian apt). apt-get install wget/unzip всё ещё работает. Godot тянется с github releases.
2026-05-24 15:30:48 +03:00

60 lines
1.8 KiB
YAML

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: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install deps
run: |
apt-get update -qq
apt-get install -y -qq wget unzip ca-certificates
rm -rf /var/lib/apt/lists/*
- 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"