croconut / godot-tester

A Github Action to handle testing Godot applications with GUT
MIT License
36 stars 14 forks source link

Actions stuck on unzipping #9

Closed db0 closed 2 years ago

db0 commented 2 years ago

I'm trying to create my first pipeline using godot-tester, but it's failing because it's getting stuck during unzipping

Run croconut/godot-tester@v2.2
/usr/bin/docker run --name e28490be9d109211014fcd93cde7beaf172b45_05c85b --label e28490 --workdir /github/workspace --rm -e INPUT_IMPORT-TIME -e INPUT_TEST-TIMEOUT -e INPUT_MINIMUM-PASS -e INPUT_TEST-DIR -e INPUT_VERSION -e INPUT_RELEASE_TYPE -e INPUT_PATH -e INPUT_IS-MONO -e HOME -e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RETENTION_DAYS -e GITHUB_RUN_ATTEMPT -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_SERVER_URL -e GITHUB_API_URL -e GITHUB_GRAPHQL_URL -e GITHUB_REF_NAME -e GITHUB_REF_PROTECTED -e GITHUB_REF_TYPE -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e GITHUB_ACTION_REPOSITORY -e GITHUB_ACTION_REF -e GITHUB_PATH -e GITHUB_ENV -e RUNNER_OS -e RUNNER_ARCH -e RUNNER_NAME -e RUNNER_TOOL_CACHE -e RUNNER_TEMP -e RUNNER_WORKSPACE -e ACTIONS_RUNTIME_URL -e ACTIONS_RUNTIME_TOKEN -e ACTIONS_CACHE_URL -e GITHUB_ACTIONS=true -e CI=true -...
downloading godot from https://downloads.tuxfamily.org/godotengine/3.2.2/Godot_v3.2.2-stable_linux_headless.64.zip ...
unzipping ...

I've waited over an hour for this to proceed, but it never does.

croconut commented 2 years ago

What arguments are you passing?

croconut commented 2 years ago

Are you using the checkout action? It's basically required for this to be useful. You'll also want to set the timeout to see output for what happened because I've seen badly written tests (it was me lol) just get stuck and it hangs the process.

Also does it work with v2.1?

croconut commented 2 years ago

There's honestly so many things that can go wrong that I don't actually check for in this action. Like do you have GUT installed, are you requesting the right version of Godot, does your testing work when you run it locally, did GUT make breaking changes recently.

db0 commented 2 years ago

GUT is installed and passing all tests. You can see my current args here: https://github.com/db0/godot-card-game-framework/blob/main/.github/workflows/main.yml

The 4th time I used this action, it run. Unfortunately GUT failed miserably when running the tests. Are you using the GUT CLI commands?

croconut commented 2 years ago

Pass rate is 0 to 1 so 100 would always fail. I think you want to increase your import time? Im seeing lots of script errors.

This does use the cli to run the tests, it's pretty much all in entrypoint.sh if you want to see what's happening.

croconut commented 2 years ago

I'll just fork your repo, I didn't test this on any really big projects anyways.

db0 commented 2 years ago

Tried to increase the import time, but it seems to be stuck on unzipping again :-/

db0 commented 2 years ago

Ye go ahead. I'm having trouble making GUT cli run on my desktop, but it's windows and GUT says it's untested in git bash so I thought this was why.

croconut commented 2 years ago

Hmm there's about 100+ errors running your project on a linux machine. I also can't get headless to finish testing running locally on my computer.

croconut commented 2 years ago

Doesn't seem like it'll be compatible with headless version, i'll see how it does with standard linux version and if that can be run in a container. image

croconut commented 2 years ago

Oh nevermind it fails on the linux version of godot too. It appears to be pathing issues due to filename issues probably. Linux is case sensitive and I think windows isn't

db0 commented 2 years ago

I see. I'll see if I can get a linux box running somewhere I can use to test and adjust.

db0 commented 2 years ago

However the main issue persists, in that the Github actions are never finishing unzipping. See the last one still running: https://github.com/db0/godot-card-game-framework/runs/4123813583

croconut commented 2 years ago

No it finishes unzipping I just don't write any output after unzipping until tests complete. What's happening is your tests take forever for CLI to complete because it's getting a ton of errors. Might be a GUT issue with CLI not working as well for mouse movements.

Seeing the same issue when I run the standard godot linux

db0 commented 2 years ago

But the other time it run, it did put an output, and I've put 20 minutes timeout, no?

croconut commented 2 years ago

Sometimes it'll run faster? You cancelled the last run at 17 minutes, so it might have just needed a few more.

If you can get rid of the errors it'll probably work within a reasonable amount of time. Seems like it's because the gut scene doesn't get parented to the root scene when its run from CLI so get_tree() returns nothing. I think I had a workaround for this IIRC, I'll look through some of my old code.

croconut commented 2 years ago

Interesting, I have a workaround. I'll PR my changes for your repo and add an option to my action to allow this style of running from CLI.

Oof or maybe not just yet. Forgot a step :/

croconut commented 2 years ago

Alright now it's working on my fork. I'll update godot-tester to allow this to work on my end tomorrow.

db0 commented 2 years ago

Seems like it's because the gut scene doesn't get parented to the root scene when its run from CLI so get_tree() returns nothing. I think I had a workaround for this IIRC, I'll look through some of my old code.

Oh? Yes please, I'm completely lost on why GUT is failing so miserably on CLI :-/

db0 commented 2 years ago

Also, a suggestion, just print out something else like "Starting GUT tests" after "unzipping", so it's a bit more obvious what is happening :) Also, isn't it possible to just spit out the logs real-time?

croconut commented 2 years ago

Also, a suggestion, just print out something else like "Starting GUT tests" after "unzipping", so it's a bit more obvious what is happening :)

Oh 100% going to log that. I'll also add some extra info if I can't figure out a way to do real time test logging.

Also, isn't it possible to just spit out the logs real-time?

I need to capture the output so I can determine pass/fail, but I'll look into work arounds that allow normal logging.

croconut commented 2 years ago

v2.3 has real time logging and I can run your tests but they aren't fully compatible with linux headless. i got 91% pass rate, i'll see if running with linux standard works when there's no gui.

croconut commented 2 years ago

i'm closing this issue and i'll make a new linux standard issue, as this specific issue has been resolved