|
|
|
|
14
|
const prefix = android ? `android.emu` : `ios.sim`;
|
14
|
const prefix = android ? `android.emu` : `ios.sim`;
|
15
|
const suffix = release ? `release` : `debug`;
|
15
|
const suffix = release ? `release` : `debug`;
|
16
|
const configuration = `${prefix}.${suffix}`;
|
16
|
const configuration = `${prefix}.${suffix}`;
|
17
|
- const cleanup = process.env.CI ? `--cleanup` : ``;
|
|
|
18
|
const headless$ = android ? headless ? `--headless` : `` : ``;
|
17
|
const headless$ = android ? headless ? `--headless` : `` : ``;
|
19
|
const workers = multi ? 3 : 1;
|
18
|
const workers = multi ? 3 : 1;
|
20
|
|
19
|
|
21
|
- if (platform === 'android' && process.env.CI) {
|
|
|
|
|
20
|
+ console.log('guyca', `CI: ${process.env.CI} JENKINS_CI: ${process.env.JENKINS_CI}`)
|
|
|
21
|
+ if (platform === 'android' && process.env.JENKINS_CI) {
|
22
|
const sdkmanager = '/usr/local/share/android-sdk/tools/bin/sdkmanager';
|
22
|
const sdkmanager = '/usr/local/share/android-sdk/tools/bin/sdkmanager';
|
23
|
exec.execSync(`echo y | ${sdkmanager} --update && echo y | ${sdkmanager} --licenses`);
|
23
|
exec.execSync(`echo y | ${sdkmanager} --update && echo y | ${sdkmanager} --licenses`);
|
24
|
}
|
24
|
}
|
|
|
|
|
26
|
if (!skipBuild) {
|
26
|
if (!skipBuild) {
|
27
|
exec.execSync(`detox build --configuration ${configuration}`);
|
27
|
exec.execSync(`detox build --configuration ${configuration}`);
|
28
|
}
|
28
|
}
|
29
|
- exec.execSync(`detox test --configuration ${configuration} --platform ${platform} ${cleanup} ${headless$} ${!android ? `-w ${workers}` : ``}`); //-f "ScreenStyle.test.js" --loglevel trace
|
|
|
|
|
29
|
+ exec.execSync(`detox test --configuration ${configuration} --platform ${platform} ${headless$} ${!android ? `-w ${workers}` : ``}`); //-f "ScreenStyle.test.js" --loglevel trace
|
30
|
}
|
30
|
}
|