Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI import fix #4

Merged
merged 9 commits into from
Jun 28, 2021
4 changes: 4 additions & 0 deletions .github/workflows/run_wat_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ jobs:
cp /usr/local/bin/GodotSharp/Api/Release/* .mono/assemblies/Debug
- name: Compile
run: msbuild
- name: Reimport Assets
run: godot --editor addons/WAT/rebuild_and_close.tscn
timeout-minutes: 1
continue-on-error: true
- name: Run
run: godot addons/WAT/cli.tscn -run_all
- name: Upload Test Results
Expand Down
1 change: 1 addition & 0 deletions addons/WAT/plugin.gd
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ extends EditorPlugin
const RUN_CURRENT_SCENE_GODOT_3_2: int = 39
const RUN_CURRENT_SCENE_GODOT_3_1: int = 33
const Title: String = "Tests"
const Rebuild: Script = preload("res://addons/WAT/rebuild_and_close.gd")
const Settings: Script = preload("res://addons/WAT/settings.gd")
const GUI: PackedScene = preload("res://addons/WAT/gui.tscn")
const Docker: Script = preload("res://addons/WAT/ui/scripts/docker.gd")
Expand Down
16 changes: 16 additions & 0 deletions addons/WAT/rebuild_and_close.gd
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
tool
extends Label

var delay = 0.0

func _ready() -> void:
push_warning("Starting reimport process...")

func _process(delta) -> void:
delay = delay + delta
text = String(delay)
if (delay > 10):
push_warning("Exiting reimport process...")
OS.exit_code = 0
get_tree().quit()
pass
12 changes: 12 additions & 0 deletions addons/WAT/rebuild_and_close.tscn
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[gd_scene load_steps=2 format=2]

[ext_resource path="res://addons/WAT/rebuild_and_close.gd" type="Script" id=1]

[node name="Label" type="Label"]
margin_right = 50.0
margin_bottom = 25.0
text = "5.603025"
script = ExtResource( 1 )
__meta__ = {
"_edit_use_anchors_": false
}