Skip to content

Commit e406237

Browse files
committed
test: skip iOS integration flows on CI by default
1 parent 2b10e5b commit e406237

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

test/integration/ios.test.ts

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { createIntegrationTestContext, runCliJson } from './test-helpers.ts';
66
const session = ['--session', 'ios-test'];
77
const iosTarget = ['--platform', 'ios'];
88
const iosPhysicalUdid = process.env.IOS_UDID?.trim();
9+
const runIosIntegrationOnCi = isEnvTruthy(process.env.AGENT_DEVICE_RUN_IOS_INTEGRATION_ON_CI);
910
let didRunIosPhysicalSession = false;
1011

1112
test.after(() => {
@@ -114,9 +115,17 @@ test('ios physical device core lifecycle', { skip: shouldSkipIosPhysicalDevice()
114115
});
115116

116117
function shouldSkipIos(): boolean {
117-
return process.platform !== 'darwin';
118+
return process.platform !== 'darwin' || (isCi() && !runIosIntegrationOnCi);
118119
}
119120

120121
function shouldSkipIosPhysicalDevice(): boolean {
121-
return process.platform !== 'darwin' || !iosPhysicalUdid;
122+
return process.platform !== 'darwin' || !iosPhysicalUdid || isCi();
123+
}
124+
125+
function isCi(): boolean {
126+
return isEnvTruthy(process.env.CI);
127+
}
128+
129+
function isEnvTruthy(value: string | undefined): boolean {
130+
return ['1', 'true', 'yes', 'on'].includes((value ?? '').toLowerCase());
122131
}

0 commit comments

Comments
 (0)