# Long hang when starting testing in GitHub CI

**URL:** <https://forums.swift.org/t/long-hang-when-starting-testing-in-github-ci/82920>\
**Category:** Package Manager\
**Tags:** packagemanager, ci\
**Created:** [October 28, 2025, 10:55pm UTC](https://forums.swift.org/t/long-hang-when-starting-testing-in-github-ci/82920 "2025-10-28T22:55:05Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![dabrahams](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/dabrahams/32/9815_2.png) [@dabrahams](https://forums.swift.org/u/dabrahams)\
**Post date:** [October 28, 2025, 10:55pm UTC](https://forums.swift.org/t/long-hang-when-starting-testing-in-github-ci/82920/1 "2025-10-28T22:55:05Z")

</div>

In GitHub CI only, `swift test` on my little project has a long hang right after it completes its build commands (even if everything was already built—it does some trivial build steps) before any tests begin to run. Reproduces there on Mac and Windows, but not Linux, which is blazingly fast. I can’t reproduce it locally. Is anybody else seeing this?

---

<div class="post-metadata">

**Author:** ![MahdiBM](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/mahdibm/32/45271_2.png) [@MahdiBM](https://forums.swift.org/u/MahdiBM)\
**Post date:** [October 29, 2025, 3:58am UTC](https://forums.swift.org/t/long-hang-when-starting-testing-in-github-ci/82920/2 "2025-10-29T03:58:47Z")

</div>

Any chance you're using swiftly in CI but you're just trying to reproduce with Xcode toolchains locally?

Had a problem with swiftly toolchains a few weeks ago only on macOS (it’s not resolved, I just worked around it) so thought it's worth a shot to ask.

---

<div class="post-metadata">

**Author:** ![dabrahams](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/dabrahams/32/9815_2.png) [@dabrahams](https://forums.swift.org/u/dabrahams)\
**Post date:** [October 29, 2025, 1:30pm UTC](https://forums.swift.org/t/long-hang-when-starting-testing-in-github-ci/82920/3 "2025-10-29T13:30:14Z")

</div>

I’m using whatever [SwiftyLab/setup-swift](https://github.com/SwiftyLab/setup-swift) does. Happens on Mac and Windows, and swiftly doesn’t support Windows. is your problem with swiftly related to a hang in testing via SPM?

---

<div class="post-metadata">

**Author:** ![MahdiBM](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/mahdibm/32/45271_2.png) [@MahdiBM](https://forums.swift.org/u/MahdiBM)\
**Post date:** [October 29, 2025, 1:45pm UTC](https://forums.swift.org/t/long-hang-when-starting-testing-in-github-ci/82920/4 "2025-10-29T13:45:14Z")

</div>

Nah its not a hang, but I thought it's worth a shot.

My issue (and a couple other people have also reported the same issue) is some kind of function lookup failure where swift chooses the default implementation of a requirement in a protocol, instead of resolving the function to the custom function the type conforming to that protocol is providing.

I can imagine this can somehow result in a hang too, under specific circumstances.

In my case it was a crash though.

---

<div class="post-metadata">

**Author:** ![dabrahams](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/dabrahams/32/9815_2.png) [@dabrahams](https://forums.swift.org/u/dabrahams)\
**Post date:** [October 29, 2025, 5:52pm UTC](https://forums.swift.org/t/long-hang-when-starting-testing-in-github-ci/82920/5 "2025-10-29T17:52:46Z")

</div>

My issue is unrelated. All the build steps are completed by the time the hang occurs. This is surely something in SPM.

---

<div class="post-metadata">

**Author:** ![vanvoorden](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/vanvoorden/32/33619_2.png) [@vanvoorden](https://forums.swift.org/u/vanvoorden)\
**Post date:** [October 29, 2025, 6:40pm UTC](https://forums.swift.org/t/long-hang-when-starting-testing-in-github-ci/82920/6 "2025-10-29T18:40:26Z")

</div>

Is this project open source? Can you share the log from the build job that was hanging?

---

<div class="post-metadata">

**Author:** ![dabrahams](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/dabrahams/32/9815_2.png) [@dabrahams](https://forums.swift.org/u/dabrahams)\
**Post date:** [October 29, 2025, 7:53pm UTC](https://forums.swift.org/t/long-hang-when-starting-testing-in-github-ci/82920/7 "2025-10-29T19:53:36Z")

</div>

Most of the details, including a very short excerpt of the log, are [here](https://github.com/swiftlang/swift-package-manager/issues/9305). There's truly nothing interesting the build output (and `--verbose` doesn't change anything) but if you want everything it is [here](https://gist.github.com/dabrahams/99fb9a596a867b9e5d6c8134e85813f1).

---

<div class="post-metadata">

**Author:** ![vanvoorden](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/vanvoorden/32/33619_2.png) [@vanvoorden](https://forums.swift.org/u/vanvoorden)\
**Post date:** [October 29, 2025, 8:12pm UTC](https://forums.swift.org/t/long-hang-when-starting-testing-in-github-ci/82920/8 "2025-10-29T20:12:07Z")

</div>

Hmm… maybe some potential ideas:

- I think this log implies you are testing `debug`? Have you seen the same hanging when testing `release`?
- Are all those external dependencies necessary for your tests? Are any of those external dependencies only for targets other than the tests?
- Do you know if the `swift-syntax` dependency is hitting the prebuilt cache? Or have you attempted to clone and build from scratch?
- I've been using `swiftly-action` from Vapor in my repos. Do you have the option to experiment and switch actions?

---

<div class="post-metadata">

**Author:** ![dabrahams](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/dabrahams/32/9815_2.png) [@dabrahams](https://forums.swift.org/u/dabrahams)\
**Post date:** [October 29, 2025, 9:01pm UTC](https://forums.swift.org/t/long-hang-when-starting-testing-in-github-ci/82920/9 "2025-10-29T21:01:12Z")

</div>

I haven't tried release. All the dependencies are needed. It's hard to imagine that whether the swift-syntax dependency is in the cache is relevant, since all the build steps are complete by the time it hangs. Yes, I could switch actions, but anything based on swiftly won't work for Windows.

---

<div class="post-metadata">

**Author:** ![bkhouri](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/bkhouri/32/45895_2.png) [@bkhouri](https://forums.swift.org/u/bkhouri)\
**Post date:** [October 31, 2025, 7:18pm UTC](https://forums.swift.org/t/long-hang-when-starting-testing-in-github-ci/82920/10 "2025-10-31T19:18:03Z")

</div>

Could be [`swift test` output is buffered (rather than streamed) for swift-testing tests on Windows · Issue #8928 · swiftlang/swift-package-manager · GitHub](https://github.com/swiftlang/swift-package-manager/issues/8928).

---

<div class="post-metadata">

**Author:** ![dabrahams](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/dabrahams/32/9815_2.png) [@dabrahams](https://forums.swift.org/u/dabrahams)\
**Post date:** [November 1, 2025, 4:16pm UTC](https://forums.swift.org/t/long-hang-when-starting-testing-in-github-ci/82920/11 "2025-11-01T16:16:00Z")

</div>

Nope, there are very few tests, they run fast even on windows, and, more importantly, it happens on macOS.
