am really confused why the windows tests fail most...
# kotest-contributors
s
am really confused why the windows tests fail most times in PRs but always pass in main. It seems to be using the same config (and I updated the PR workflow to clone the master workflow). https://github.com/kotest/kotest/actions/runs/18655653779/job/53184578443
😕 1
p
Had a quick look at this (https://github.com/kotest/kotest/pull/5187) It seems like yarn can be quite picky with connectivity and there's suggestions that the windows runner connectivity isn't exactly speedy. One solution might be to use
.yarnrc
to set a larger network-timeout to allow a bit more wiggle room for downloading modules. Or as the linked PR attempts, just side-step the entire issue by not enabling JS on the windows runner (or any secondary target). I've also noticed that the primary targets weren't actually running anything... at some point I assume the
check
task was removed from the task list. I've added this back in.
gratitude thank you 1
s
Awesome Phil thank you
p
🤞 it makes a difference
🤔 The PR build seems to be assuming that
kotest_enabledPublicationNamePrefixes
limits the targets that are `check`ed however it seems all tests are run for all targets for each of the matrix-strategy builds (with only difference likely due to different runner os testing different native targets).
We can either reduce the primary targets down to a single
check
run or enable/disable JS/Native as required for each job (i.e. enable js only for js/wasm, native for linux, etc)
s
I like running them separately, makes it easier to spot which one is broken I think
but happy to do whatever
p
Going with
Copy code
include:
               # JVM-only
               -  os: ubuntu-latest
                  args: -P"jvmOnly=true"
               # Js+Wasm
               -  os: ubuntu-latest
                  args: -P"kotest_enableKotlinJs=true"
               # Linux+Android
               -  os: ubuntu-latest
                  args: -P"kotest_enableKotlinNative=true"
               # Windows: MinGW
               -  os: windows-latest
                  args: -P"kotest_enableKotlinNative=true"
               # Apple: macOS/iOS/tvOS/watchOS
               -  os: macos-latest
                  args: -P"kotest_enableKotlinNative=true"
seems to be the sweet spot - I don't think there's a need to split into primary/secondary targets now there's only one job running for macos (check was running the tests for all targets anyway, so little point in running it 4 times any more) especially given the matrix strategy will fail-fast and cancel any outstanding/running jobs should the JVM job fail (it takes ~8mins to run, macos takes ~1hr) Short of adding more granular target-flags (i.e.
kotest_enableTvOS
etc) to allow more selective inclusion when running
check
this will likely suffice for now and fix the current flakey windows tests while we're at it (by disabling JS for the windows tests and side-stepping the whole yarn network timeout issue).