Skip to content

test #129

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

test #129

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions .github/workflows/gut_unit_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Gut

on:
pull_request:
push:
branches: [ master, main ]

jobs:
gut-linux:
runs-on: ubuntu-latest
container:
image:
barichello/godot-ci:3.5.1
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Gut
run: |
cd demo/
godot -s --path $PWD addons/gut/gut_cmdln.gd -gdir=res://tests -glog=1 -ginclude_subdirs -gexit

gut-osx:
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: download godot
run: |
wget https://downloads.tuxfamily.org/godotengine/${{env.GODOT_VERSION}}/Godot_v${{env.GODOT_VERSION}}-stable_osx.universal.zip
unzip Godot_v${{env.GODOT_VERSION}}-stable_osx.universal.zip
rm Godot_v${{env.GODOT_VERSION}}-stable_osx.universal.zip

- name: Gut
run: |
cd demo/
godot -s --path $PWD addons/gut/gut_cmdln.gd -gdir=res://tests -glog=1 -ginclude_subdirs -gexit
17 changes: 17 additions & 0 deletions demo/.gut_editor_shortcuts.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[main]

run_all=Object(ShortCut,"resource_local_to_scene":false,"resource_name":"","shortcut":Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":true,"meta":false,"command":false,"pressed":false,"scancode":49,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
,"script":null)

run_current_script=Object(ShortCut,"resource_local_to_scene":false,"resource_name":"","shortcut":Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":true,"meta":false,"command":false,"pressed":false,"scancode":50,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
,"script":null)

run_current_inner=Object(ShortCut,"resource_local_to_scene":false,"resource_name":"","shortcut":Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":true,"meta":false,"command":false,"pressed":false,"scancode":51,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
,"script":null)

run_current_test=Object(ShortCut,"resource_local_to_scene":false,"resource_name":"","shortcut":Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":true,"meta":false,"command":false,"pressed":false,"scancode":52,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
,"script":null)

panel_button=Object(ShortCut,"resource_local_to_scene":false,"resource_name":"","shortcut":Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":true,"meta":false,"command":false,"pressed":false,"scancode":48,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
,"script":null)

8 changes: 8 additions & 0 deletions demo/BigFont.tres
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[gd_resource type="DynamicFont" load_steps=2 format=2]

[sub_resource type="DynamicFontData" id=9]
font_path = "res://addons/gut/fonts/LobsterTwo-BoldItalic.ttf"

[resource]
size = 40
font_data = SubResource( 9 )
6 changes: 6 additions & 0 deletions demo/BigFontTheme.tres
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[gd_resource type="Theme" load_steps=2 format=2]

[ext_resource path="res://BigFont.tres" type="DynamicFont" id=1]

[resource]
default_font = ExtResource( 1 )
20 changes: 10 additions & 10 deletions demo/Main.gd
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
extends Control

func _enter_tree():
var _error : int = $Database.connect("output_received", self, "_on_output_received")
_error = $Database.connect("texture_received", self, "_on_texture_received")
var _error : int = $Database.connect("output_received", self, "_on_output_received")
_error = $Database.connect("texture_received", self, "_on_texture_received")

func _on_output_received(text : String) -> void:
var label := Label.new()
$MarginContainer/VBoxContainer/ScrollContainer/VBoxContainer.add_child(label)
var label := Label.new()
$MarginContainer/VBoxContainer/ScrollContainer/VBoxContainer.add_child(label)

label.text = text
label.set("custom_colors/font_color", Color.limegreen)
label.autowrap = true
label.text = text
label.set("custom_colors/font_color", Color.limegreen)
label.autowrap = true

func _on_texture_received(texture : Texture) -> void:
var texture_rect := TextureRect.new()
$MarginContainer/VBoxContainer/ScrollContainer/VBoxContainer.add_child(texture_rect)
var texture_rect := TextureRect.new()
$MarginContainer/VBoxContainer/ScrollContainer/VBoxContainer.add_child(texture_rect)

texture_rect.texture = texture
texture_rect.texture = texture
Loading