From 36eae02cff20c1062a74f700a523c85787ac5a1d Mon Sep 17 00:00:00 2001 From: flexlixrup Date: Sat, 15 Feb 2025 16:52:35 +0100 Subject: [PATCH] CI: Fix running tests in CI --- Tests/PulsarTests/ServerController.swift | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Tests/PulsarTests/ServerController.swift b/Tests/PulsarTests/ServerController.swift index 2dfd46f..44cbf89 100644 --- a/Tests/PulsarTests/ServerController.swift +++ b/Tests/PulsarTests/ServerController.swift @@ -51,7 +51,11 @@ struct ServerController { static func startServer() async throws { var dockerPath: String #if canImport(Darwin) - dockerPath = "/usr/local/bin/docker" + if ProcessInfo.processInfo.environment["CI"] != nil { + dockerPath = "docker" + } else { + dockerPath = "/usr/local/bin/docker" + } #else dockerPath = "docker" @@ -71,7 +75,11 @@ struct ServerController { static func stopServer() async throws { var dockerPath: String #if canImport(Darwin) - dockerPath = "/usr/local/bin/docker" + if ProcessInfo.processInfo.environment["CI"] != nil { + dockerPath = "docker" + } else { + dockerPath = "/usr/local/bin/docker" + } #else dockerPath = "docker" #endif