Fix: only export binaries when releases are published, not on every c… #21
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Code Checks and Tests" | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
env: | |
GODOT_VERSION: 4.4.1 | |
jobs: | |
tests: | |
name: Run Tests | |
runs-on: ubuntu-22.04 | |
container: | |
image: barichello/godot-ci:4.4.1 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
lfs: true | |
- name: Setup Godot | |
run: | | |
mkdir -v -p ~/.local/share/godot/export_templates/ | |
mkdir -v -p ~/.config/ | |
mv /root/.config/godot ~/.config/godot | |
mv /root/.local/share/godot/export_templates/${GODOT_VERSION}.stable ~/.local/share/godot/export_templates/${GODOT_VERSION}.stable | |
- name: Import project (ensure .godot folder exists) | |
run: | | |
godot --headless --verbose --editor --quit-after 2 | |
- name: Run unit tests | |
run: | | |
godot --headless -s addons/gut/gut_cmdln.gd -gexit | |
lint: | |
name: Code Quality Checks | |
runs-on: ubuntu-22.04 | |
container: | |
image: barichello/godot-ci:4.4.1 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Godot | |
run: | | |
mkdir -v -p ~/.local/share/godot/export_templates/ | |
mkdir -v -p ~/.config/ | |
mv /root/.config/godot ~/.config/godot | |
mv /root/.local/share/godot/export_templates/${GODOT_VERSION}.stable ~/.local/share/godot/export_templates/${GODOT_VERSION}.stable | |
- name: Import project | |
run: | | |
godot --headless --verbose --editor --quit-after 2 | |
- name: Check for script errors | |
run: | | |
# Check that project can be parsed without errors | |
godot --headless --verbose --check-only --quit-after 1 | |
- name: Verify scene loading | |
run: | | |
# Test that main scenes can be loaded | |
godot --headless --verbose --editor --quit-after 2 2>&1 | grep -q "Loaded resource" || echo "Scene loading check completed" |