-
Notifications
You must be signed in to change notification settings - Fork 40
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
Upload Simpletest Results as an Artifact in GHA #6458
Comments
I love this! +1 |
FWIW I added these lines to the GHA test for backup_migrate and they worked great. Thanks! |
PR filed at backdrop/backdrop#4730 that enables saving the SimpleTest output as artifacts in both the regular and database-config tests. |
LGTM. I don't know much about GHA so I can't do a code review. |
Code looks good to me 👍🏼 ...if I can make a suggestion, that would be to add the PR number as a prefix to the artifact files + a timestamp as a suffix. Otherwise, assuming that people will be downloading these locally to extract and investigate/troubleshoot, it would be annoying to have the operating system naming the downloaded files with Other than that, lets please get this in! 🙂 |
Finding the pull request number is apparently difficult, because tests can run on things other than just pull requests. Big long thread on that here: actions/checkout#58 |
...from a quick research, I believe that |
...and https://stackoverflow.com/questions/60942067/get-current-date-and-time-in-github-workflows has an example on how to get the date from a GHA step. But I don't want to derail this. I'm happy to get it in as is. |
Thanks, yeah I started looking into it and just realized it's messier than you'd think. The current approach works and (hopefully) downloading artifacts will be a rare need; usually only when we're dealing with GHA-specific issues. I merged backdrop/backdrop#4730 into 1.x only, since the testing framework was reworked quite a bit in #2277, which is 1.28.0 and higher. |
I don't know about that. Seems pretty simple to me, and it works: backdrop/backdrop#4731 Feel free to close the follow-up PR if you don't agree. |
With how rare (hopefully) downloading simpletest results is; this only affecting developers; only certain browser situations; and the addition of event number potentially causing problems when running tests outside of PRs, I think I'd like to be able to just close this for 1.28.0. Thank you for filing it and we can revisit if we find it to be actually problematic. |
Description of the need
Debugging test failures in GitHub Actions is often difficult, because you can't see what is happening like you can when running tests locally through the UI. In particular, the contents of HTML pages that are loaded (and verbose messages) are helpful in that it shows you what the HTML browser sees while executing the test.
Proposed solution
We could make things more transparent as to what's happening in our GitHub Action test runs by uploading the verbose output as an artifact and attaching it to the test runs.
Alternatives that have been considered
I usually run tests locally when there is a failure, but occasionally there is an error that happens only on GitHub (like we've been experiencing with #2277).
Additional information
This can be achieved by adding this to the bottom of our test YML files:
The text was updated successfully, but these errors were encountered: