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

Refresh CI cookie #118

Closed
wants to merge 5 commits into from
Closed

Refresh CI cookie #118

wants to merge 5 commits into from

Conversation

Dionysusnu
Copy link
Contributor

No description provided.

Change to {} so cat output is actually printed
@Dionysusnu
Copy link
Contributor Author

Dionysusnu commented Jan 21, 2022

That didn't work..
Any help? Current problem is that with (cat test-out.txt && exit 1), the cat output is not actually printed, I think because it's being passed to exit? How would I run both commands and still make cat output to the console?

@nottirb
Copy link
Contributor

nottirb commented Jan 28, 2022

That didn't work.. Any help? Current problem is that with (cat test-out.txt && exit 1), the cat output is not actually printed, I think because it's being passed to exit? How would I run both commands and still make cat output to the console?

Not quite sure what you're looking for here. Everything seems to work as intended.

If and only if we fail test cases will we end up running (cat test-out.txt && exit 1), and from what I checked, it does cat the entire test-out.txt file. See Check test status under: https://github.com/Elttob/Fusion/runs/4627907999?check_suite_focus=true

If you're looking to output the full test-out.txt file when we pass all the test cases we need to have grep be quiet using -q and then combine it with && cat test-out.txt:

(cat test-out.txt | grep -q "0 failed, 0 skipped" && cat test-out.txt) || (cat test-out.txt && exit 1)

If I'm misunderstanding something, and you're looking for something else please let me know!

@Dionysusnu
Copy link
Contributor Author

Dionysusnu commented Jan 29, 2022

If and only if we fail test cases will we end up running (cat test-out.txt && exit 1), and from what I checked, it does cat the entire test-out.txt file. See Check test status under: https://github.com/Elttob/Fusion/runs/4627907999?check_suite_focus=true

That's exactly what I was trying to achieve.. I looked at a few fail runs and never saw that output. Guess it was a fluke. No changes necessary then (on the cat part, PR still open since cookie refresh is relevant).

@Dionysusnu
Copy link
Contributor Author

See now, there, there's no output:

Run cat test-out.txt | grep "0 failed, 0 skipped" || (cat test-out.txt && exit 1)
Error: Process completed with exit code 1.

I think the issue is there literally is no output, because run-in-roblox fails get posted to stderr. Is there any way to combine the stdout and stderr into a single file (test-out.txt) so it gets printed as well?

@nottirb
Copy link
Contributor

nottirb commented Jan 29, 2022

I think the issue is there literally is no output, because run-in-roblox fails get posted to stderr. Is there any way to combine the stdout and stderr into a single file (test-out.txt) so it gets printed as well?

You can change > into &> to have both stdout and stderr go to the same file:

run: run-in-roblox --place test.rbxl --script test-runner/Run.client.lua &> test-out.txt

You can see this in a test workflow I did (see Check test status):
https://github.com/nottirb/Fusion/runs/4989268886?check_suite_focus=true

I ran this test workflow to verify that it does what you're looking for. If you're looking for something else, lmk!

@Dionysusnu
Copy link
Contributor Author

That's it! Thanks for the help.

@dphfox
Copy link
Owner

dphfox commented Jan 29, 2022

Thanks for the help guys! I'm not super experienced with this stuff so it's good you guys are willing to help out :)

Should I merge this now?

@dphfox dphfox added the targeting: meta About the Fusion project/maintenance/repo label Jan 29, 2022
@nottirb
Copy link
Contributor

nottirb commented Jan 29, 2022

We might need to refresh that cookie again before merging this, since run-in-roblox is failing atm. Might also be worth looking into rojo-rbx/run-in-roblox#21

@dphfox
Copy link
Owner

dphfox commented Jun 5, 2022

Resolved by #170

@dphfox dphfox closed this Jun 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
targeting: meta About the Fusion project/maintenance/repo
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants