Skip to content

Commit 90ba7d4

Browse files
committed
Remove is running in CI
1 parent 4a1ee04 commit 90ba7d4

File tree

2 files changed

+15
-9
lines changed

2 files changed

+15
-9
lines changed

src/utilities/utilities.ts

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,24 @@ import { SwiftToolchain } from "../toolchain/toolchain";
2929
export const IS_PRODUCTION_BUILD = process.env.NODE_ENV === "production";
3030

3131
/**
32-
* Whether or not the code is being run in CI.
33-
*
34-
* Code that checks for this will be removed completely when the extension is packaged into
35-
* a VSIX.
36-
* @deprecated
32+
* Whether or not the code is being run in a Github Actions workflow.
33+
*/
34+
export const IS_RUNNING_UNDER_GITHUB_ACTIONS = process.env.GITHUB_ACTIONS === "true";
35+
36+
/**
37+
* Whether or not the code is being run by `act` CLT.
38+
*/
39+
export const IS_RUNNING_UNDER_ACT = process.env.ACT === "true";
40+
41+
/**
42+
* Whether or not the code is being run in a docker container.
3743
*/
38-
export const IS_RUNNING_IN_CI = process.env.CI === "1";
44+
export const IS_RUNNING_UNDER_DOCKER = IS_RUNNING_UNDER_ACT || IS_RUNNING_UNDER_GITHUB_ACTIONS;
3945

4046
/**
4147
* Whether or not the code is being run as part of a test suite.
4248
*
43-
* This will NOT be removed when the extension is packaged into a VSIX.
49+
* This will NOT be removed when the extension is packaged into a VSIX, unlike "CI" variable.
4450
*/
4551
export const IS_RUNNING_UNDER_TEST = process.env.RUNNING_UNDER_VSCODE_TEST_CLI === "1";
4652

test/integration-tests/debugger/lldb.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import { getLLDBLibPath } from "../../../src/debugger/lldb";
1717
import { WorkspaceContext } from "../../../src/WorkspaceContext";
1818
import { activateExtensionForTest } from "../utilities/testutilities";
1919
import { Version } from "../../../src/utilities/version";
20-
import { IS_RUNNING_IN_CI } from "../../../src/utilities/utilities";
20+
import { IS_RUNNING_UNDER_DOCKER } from "../../../src/utilities/utilities";
2121

2222
suite("lldb contract test suite", () => {
2323
let workspaceContext: WorkspaceContext;
@@ -26,7 +26,7 @@ suite("lldb contract test suite", () => {
2626
async setup(ctx) {
2727
// lldb.exe on Windows is not launching correctly, but only in Docker.
2828
if (
29-
IS_RUNNING_IN_CI &&
29+
IS_RUNNING_UNDER_DOCKER &&
3030
process.platform === "win32" &&
3131
ctx.globalToolchainSwiftVersion.isGreaterThanOrEqual(new Version(6, 0, 0)) &&
3232
ctx.globalToolchainSwiftVersion.isLessThan(new Version(6, 0, 2))

0 commit comments

Comments
 (0)