Skip to content

Commit

Permalink
chore: adding script for godot's initial import
Browse files Browse the repository at this point in the history
This is apparently required to run gut tests in CI, and also is deemed
to small a work-around to include in gut itself. bitwes/Gut#301

I must be doing something wrong!
  • Loading branch information
russmatney committed Oct 3, 2023
1 parent 524e7e4 commit cf04520
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/gut_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
mkdir -p ~/.config/godot
unzip Godot_v${{ vars.GODOT_VERSION }}-stable_linux.x86_64.zip
mv Godot_v${{ vars.GODOT_VERSION }}-stable_linux.x86_64 /usr/local/bin/godot
godot --editor --headless --quit
godot --editor --headless -s addons/core/initial_import.gd
- name: Run tests
shell: bash
Expand Down
13 changes: 13 additions & 0 deletions addons/core/initial_import.gd
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
@tool
extends SceneTree

var delay = 0.0
var max_delay = 15.0

func _process(delta):
delay += delta

if delay > max_delay:
push_warning("Initial import complete, exiting")
# OS.set_exit_code(0)
quit()

0 comments on commit cf04520

Please sign in to comment.