-
Notifications
You must be signed in to change notification settings - Fork 111
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Skip containerized tests in GHA on M-series mac
- Loading branch information
1 parent
541ece1
commit 8642d79
Showing
2 changed files
with
184 additions
and
144 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import { platform, arch } from "node:os"; | ||
|
||
function isMSeriesMac() { | ||
return platform() === "darwin" && arch() === "arm64"; | ||
} | ||
|
||
function isWindows() { | ||
return platform() === "win32"; | ||
} | ||
|
||
function isCI() { | ||
// eslint-disable-next-line no-process-env | ||
return (process.env.CI ?? "").toLowerCase() === "true"; | ||
} | ||
|
||
/** | ||
* GitHub Actions doesn't support containers on m-series macOS due to a lack of hypervisor support for nested | ||
* virtualization. | ||
* | ||
* For details, see https://github.com/actions/runner-images/issues/9460#issuecomment-1981203045 | ||
* | ||
* GitHub actions also doesn't support Linux containers on Windows, and may never do so. This is in part due to Docker | ||
* Desktop licensing restrictions, and the complexity of setting up Moby or similar without Docker Desktop. | ||
* Unfortunately, TestContainers doesn't support windows containers, so we can't run the tests on Windows either. | ||
* | ||
* For details, see https://github.com/actions/runner/issues/904 and | ||
* https://java.testcontainers.org/supported_docker_environment/windows/#windows-container-on-windows-wcow | ||
* | ||
* | ||
*/ | ||
export function isSkippedCIEnvironment() { | ||
return isCI() && (isWindows() || isMSeriesMac()); | ||
} |