diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4cba88cb7..5f15b293b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -136,7 +136,7 @@ jobs: name: ${{ matrix.wizard }} E2E Tests (${{ matrix.os }}) needs: job_build runs-on: ${{ matrix.os }} - timeout-minutes: 10 + timeout-minutes: 60 strategy: matrix: wizard: diff --git a/e2e-tests/tests/react-native.test.ts b/e2e-tests/tests/react-native.test.ts index 1d387eea6..dda1dbe73 100644 --- a/e2e-tests/tests/react-native.test.ts +++ b/e2e-tests/tests/react-native.test.ts @@ -22,7 +22,7 @@ describe('ReactNative', () => { let podInstallPrompted = false; beforeAll(async () => { - const wizardInstance = startWizardInstance(integration, projectDir); + const wizardInstance = startWizardInstance(integration, projectDir, true); const packageManagerPrompted = await wizardInstance.waitForOutput( 'Please select your package manager.', ); @@ -65,8 +65,8 @@ describe('ReactNative', () => { const prettierPrompted = podInstallPrompted && (await wizardInstance.sendStdinAndWaitForOutput( - // Skip pod install - [KEYS.DOWN, KEYS.ENTER], + // Pod install + [KEYS.ENTER], 'Looks like you have Prettier in your project. Do you want to run it on your files?', )); @@ -153,6 +153,7 @@ Sentry.init({ test('ios/sentry.properties is added', () => { if (!podInstallPrompted) { + // Skip this test if not on MacOS return; } checkFileContents( @@ -187,6 +188,7 @@ defaults.url=https://sentry.io/`, test('xcode project is updated correctly', () => { if (!podInstallPrompted) { + // Skip this test if not on MacOS return; } checkFileContents( @@ -213,4 +215,13 @@ defaults.url=https://sentry.io/`, const builds = await checkIfReactNativeReleaseBuilds(projectDir, 'android'); expect(builds).toBe(true); }); + + test('ios project builds correctly', { timeout: 3_600_000 }, async () => { + if (!podInstallPrompted) { + // Skip this test if not on MacOS + return; + } + const builds = await checkIfReactNativeReleaseBuilds(projectDir, 'ios', true); + expect(builds).toBe(true); + }); }); diff --git a/e2e-tests/utils/index.ts b/e2e-tests/utils/index.ts index 802339757..29f38b5d9 100644 --- a/e2e-tests/utils/index.ts +++ b/e2e-tests/utils/index.ts @@ -580,10 +580,25 @@ export async function checkIfReactNativeReleaseBuilds( env = { SENTRY_DISABLE_AUTO_UPLOAD: 'true' }; } else { // ios - command = 'TODO'; - args = ['TODO']; + command = 'xcodebuild'; + args = [ + '-workspace', + 'reactnative078.xcworkspace', + '-scheme', + 'reactnative078', + '-configuration', + 'Release', + '-arch', + 'arm64', + '-sdk', + 'iphonesimulator', + 'CODE_SIGN_IDENTITY=', + 'CODE_SIGNING_REQUIRED=NO', + 'CODE_SIGNING_ALLOWED=NO', + 'build' + ]; cwd = path.join(projectDir, 'ios'); - env = {}; + env = { SENTRY_DISABLE_AUTO_UPLOAD: 'true' }; } const testEnv = new WizardTestEnv(command, args, { @@ -593,7 +608,7 @@ export async function checkIfReactNativeReleaseBuilds( }); const builtSuccessfully = await testEnv.waitForStatusCode(0, { - timeout: 1_200_000, + timeout: 3_600_000, }); testEnv.kill();