PankuConsole icon indicating copy to clipboard operation
PankuConsole copied to clipboard

Add unit test workflow

Open Ark2000 opened this issue 3 years ago • 3 comments

By utilizing this great project: https://github.com/bitwes/Gut

A good reference: https://github.com/bitbrain/beehave/blob/godot-4.x/.github/workflows/unit-tests.yml

Ark2000 avatar Dec 07 '22 12:12 Ark2000

I got GUT working and created a simple input test, but Godot isn't playing nicely with the GitHub workflow VM. https://github.com/Eggbertx/PankuConsole/actions/runs/6839651321/job/18598061573#step:4:19 The command works fine and has a 0 exit code when I run it on my own computer, but it's crashing when run in the workflow. I've tried with xvfb-run (a virtual framebuffer X server) and without it, using Godot's --headless command line argument. Both result in it crashing with "Debugger Break, Reason: 'Parser Error: Could not find type "PankuLynxWindowsManager" in the current scope.'"

Eggbertx avatar Nov 12 '23 08:11 Eggbertx

I got GUT working and created a simple input test, but Godot isn't playing nicely with the GitHub workflow VM. https://github.com/Eggbertx/PankuConsole/actions/runs/6839651321/job/18598061573#step:4:19 The command works fine and has a 0 exit code when I run it on my own computer, but it's crashing when run in the workflow. I've tried with xvfb-run (a virtual framebuffer X server) and without it, using Godot's --headless command line argument. Both result in it crashing with "Debugger Break, Reason: 'Parser Error: Could not find type "PankuLynxWindowsManager" in the current scope.'"

bitbrain is using gdUnit4 as beehave's test tool, maybe gdUnit4 is a better option other than GUT

Ark2000 avatar Nov 12 '23 11:11 Ark2000

Alright, it works with gdUnit4. Though at the moment the only thing that's being tested is that the module manager is initialized and working correctly, and that the shell opens when the ~ key is "pressed" and closes when it's "pressed" again.

Eggbertx avatar Nov 13 '23 21:11 Eggbertx