experimental = ["setup-scripts"]

[profile.default]
# Mark tests that take longer than 10s as slow.
# Terminate after 120s as a stop-gap measure to terminate on deadlock.
slow-timeout =  { period = "10s", terminate-after = 12 }

[profile.ci]
test-threads = 20
status-level = "skip"
final-status-level = "slow"
failure-output = "immediate-final"
fail-fast = false

[profile.ci.junit]
path = "junit.xml"

[profile.ci-linux]
inherits = "ci"

[profile.ci-macos]
inherits = "ci"
test-threads = 12

[profile.ci-windows]
inherits = "ci"

[test-groups]
serial = { max-threads = 1 }
io-bound = { max-threads = 1 }

[[profile.default.overrides]]
filter = 'test(native_auth)'
test-group = 'serial'

[[profile.default.overrides]]
filter = 'package(uv-keyring)'
test-group = 'serial'

[[profile.ci-windows.overrides]]
platform = 'cfg(target_os = "windows")'
filter = 'test(/^python_install::/) + test(/^python_update::/) + test(/^python_find::/)'
test-group = 'io-bound'
priority = 1 # Start earlier so these can complete before the end

[scripts.setup.setup-hook-unix]
command = "scripts/nextest-setup-hook-unix.sh"

[[profile.default.scripts]]
platform = { host = "cfg(unix)" }
filter = "all()"
setup = "setup-hook-unix"
