This is a question involving probably both cargo test
and GitHub Actions.
When GitHub Actions runs CI for my Rust project, sometimes (not always) it fails due to one unit test timing out:
test foo::tests::test_bar has been running for over 60 seconds
Error: The operation was canceled.
(RUST_BACKTRACE = 1
)
Is there a way to instruct cargo
or GitHub, or both, to capture a stacktrace of the running test which caused the error? The goal is to find out how / where this test case got stuck.