Skip to content

Commit

Permalink
CI: Fix running tests in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
flexlixrup committed Feb 15, 2025
1 parent ccf2da1 commit 36eae02
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions Tests/PulsarTests/ServerController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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
Expand Down

0 comments on commit 36eae02

Please sign in to comment.