From 979682a56280b3dde2adc88f35834cbf4cb009d5 Mon Sep 17 00:00:00 2001 From: Antonis Lilis Date: Wed, 14 May 2025 14:58:57 +0300 Subject: [PATCH 01/11] Build RN iOS --- e2e-tests/tests/react-native.test.ts | 11 ++++++++--- e2e-tests/utils/index.ts | 21 ++++++++++++++++++--- 2 files changed, 26 insertions(+), 6 deletions(-) diff --git a/e2e-tests/tests/react-native.test.ts b/e2e-tests/tests/react-native.test.ts index 84d8b2917..3f00c69e8 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.', ); @@ -57,8 +57,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?', )); @@ -190,4 +190,9 @@ defaults.url=https://sentry.io/`, const builds = await checkIfReactNativeReleaseBuilds(projectDir, 'android'); expect(builds).toBe(true); }); + + test('ios project builds correctly', async () => { + 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 8f48015db..005989724 100644 --- a/e2e-tests/utils/index.ts +++ b/e2e-tests/utils/index.ts @@ -556,10 +556,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, { From a3c68c2af80d550b3f92f878513b0d2d175ec788 Mon Sep 17 00:00:00 2001 From: Antonis Lilis Date: Wed, 14 May 2025 15:09:30 +0300 Subject: [PATCH 02/11] Skip on ubuntu --- e2e-tests/tests/react-native.test.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/e2e-tests/tests/react-native.test.ts b/e2e-tests/tests/react-native.test.ts index 3f00c69e8..3ac03423e 100644 --- a/e2e-tests/tests/react-native.test.ts +++ b/e2e-tests/tests/react-native.test.ts @@ -192,6 +192,9 @@ defaults.url=https://sentry.io/`, }); test('ios project builds correctly', async () => { + if (!podInstallPrompted) { + return; + } const builds = await checkIfReactNativeReleaseBuilds(projectDir, 'ios', true); expect(builds).toBe(true); }); From 8e196b259128641d5ac4713336c3d160a9c1777e Mon Sep 17 00:00:00 2001 From: Antonis Lilis Date: Wed, 14 May 2025 18:13:26 +0300 Subject: [PATCH 03/11] Extend timeout --- e2e-tests/utils/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/e2e-tests/utils/index.ts b/e2e-tests/utils/index.ts index 005989724..b855006c1 100644 --- a/e2e-tests/utils/index.ts +++ b/e2e-tests/utils/index.ts @@ -584,7 +584,7 @@ export async function checkIfReactNativeReleaseBuilds( }); const builtSuccessfully = await testEnv.waitForStatusCode(0, { - timeout: 1_200_000, + timeout: 2_400_000, }); testEnv.kill(); From 6ee1790c3145041b2d1fae1f37c4d4bd40cebd84 Mon Sep 17 00:00:00 2001 From: Antonis Lilis Date: Wed, 14 May 2025 18:27:36 +0300 Subject: [PATCH 04/11] Disable debug logging --- e2e-tests/tests/react-native.test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/e2e-tests/tests/react-native.test.ts b/e2e-tests/tests/react-native.test.ts index 3ac03423e..2f2a699a6 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, true); + const wizardInstance = startWizardInstance(integration, projectDir); const packageManagerPrompted = await wizardInstance.waitForOutput( 'Please select your package manager.', ); @@ -195,7 +195,7 @@ defaults.url=https://sentry.io/`, if (!podInstallPrompted) { return; } - const builds = await checkIfReactNativeReleaseBuilds(projectDir, 'ios', true); + const builds = await checkIfReactNativeReleaseBuilds(projectDir, 'ios'); expect(builds).toBe(true); }); }); From f08fe52768961739b318b9518fc0af43b01d0f96 Mon Sep 17 00:00:00 2001 From: Antonis Lilis Date: Wed, 14 May 2025 18:58:15 +0300 Subject: [PATCH 05/11] Extend timeout to 20 minutes --- .github/workflows/build.yml | 2 +- e2e-tests/utils/index.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 11107f672..fb609bd32 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -130,7 +130,7 @@ jobs: name: ${{ matrix.wizard }} E2E Tests (${{ matrix.os }}) needs: job_build runs-on: ${{ matrix.os }} - timeout-minutes: 10 + timeout-minutes: 20 strategy: matrix: wizard: diff --git a/e2e-tests/utils/index.ts b/e2e-tests/utils/index.ts index b855006c1..005989724 100644 --- a/e2e-tests/utils/index.ts +++ b/e2e-tests/utils/index.ts @@ -584,7 +584,7 @@ export async function checkIfReactNativeReleaseBuilds( }); const builtSuccessfully = await testEnv.waitForStatusCode(0, { - timeout: 2_400_000, + timeout: 1_200_000, }); testEnv.kill(); From 01c3f9fe6a7932549bbb255ea7cefdbce2ae2353 Mon Sep 17 00:00:00 2001 From: Antonis Lilis Date: Wed, 14 May 2025 19:19:53 +0300 Subject: [PATCH 06/11] Increase test timeout to 20min --- e2e-tests/tests/react-native.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/e2e-tests/tests/react-native.test.ts b/e2e-tests/tests/react-native.test.ts index 2f2a699a6..5cb38dd12 100644 --- a/e2e-tests/tests/react-native.test.ts +++ b/e2e-tests/tests/react-native.test.ts @@ -191,7 +191,7 @@ defaults.url=https://sentry.io/`, expect(builds).toBe(true); }); - test('ios project builds correctly', async () => { + test('ios project builds correctly', { timeout: 1_200_000 }, async () => { if (!podInstallPrompted) { return; } From ece6cd6300ccb16f1b5bf47e83d1db1567968f0e Mon Sep 17 00:00:00 2001 From: Antonis Lilis Date: Wed, 14 May 2025 19:47:11 +0300 Subject: [PATCH 07/11] Increase timeout to 40min --- .github/workflows/build.yml | 2 +- e2e-tests/tests/react-native.test.ts | 2 +- e2e-tests/utils/index.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fb609bd32..9ad14159e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -130,7 +130,7 @@ jobs: name: ${{ matrix.wizard }} E2E Tests (${{ matrix.os }}) needs: job_build runs-on: ${{ matrix.os }} - timeout-minutes: 20 + timeout-minutes: 40 strategy: matrix: wizard: diff --git a/e2e-tests/tests/react-native.test.ts b/e2e-tests/tests/react-native.test.ts index 5cb38dd12..c14a36311 100644 --- a/e2e-tests/tests/react-native.test.ts +++ b/e2e-tests/tests/react-native.test.ts @@ -191,7 +191,7 @@ defaults.url=https://sentry.io/`, expect(builds).toBe(true); }); - test('ios project builds correctly', { timeout: 1_200_000 }, async () => { + test('ios project builds correctly', { timeout: 2_400_000 }, async () => { if (!podInstallPrompted) { return; } diff --git a/e2e-tests/utils/index.ts b/e2e-tests/utils/index.ts index 005989724..b855006c1 100644 --- a/e2e-tests/utils/index.ts +++ b/e2e-tests/utils/index.ts @@ -584,7 +584,7 @@ export async function checkIfReactNativeReleaseBuilds( }); const builtSuccessfully = await testEnv.waitForStatusCode(0, { - timeout: 1_200_000, + timeout: 2_400_000, }); testEnv.kill(); From 86aa3ef43948f597c5811d6a5b5a0d9095133142 Mon Sep 17 00:00:00 2001 From: Antonis Lilis Date: Wed, 14 May 2025 19:51:05 +0300 Subject: [PATCH 08/11] Adds comment for MacOS only tests --- e2e-tests/tests/react-native.test.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/e2e-tests/tests/react-native.test.ts b/e2e-tests/tests/react-native.test.ts index c14a36311..3b9c651f8 100644 --- a/e2e-tests/tests/react-native.test.ts +++ b/e2e-tests/tests/react-native.test.ts @@ -130,6 +130,7 @@ Sentry.init({ test('ios/sentry.properties is added', () => { if (!podInstallPrompted) { + // Skip this test if not on MacOS return; } checkFileContents( @@ -164,6 +165,7 @@ defaults.url=https://sentry.io/`, test('xcode project is updated correctly', () => { if (!podInstallPrompted) { + // Skip this test if not on MacOS return; } checkFileContents( @@ -193,6 +195,7 @@ defaults.url=https://sentry.io/`, test('ios project builds correctly', { timeout: 2_400_000 }, async () => { if (!podInstallPrompted) { + // Skip this test if not on MacOS return; } const builds = await checkIfReactNativeReleaseBuilds(projectDir, 'ios'); From 1ae610d74871f286b699ec739856ab66da54a4f7 Mon Sep 17 00:00:00 2001 From: Antonis Lilis Date: Thu, 15 May 2025 14:49:06 +0300 Subject: [PATCH 09/11] Increase timeout and enable logs --- .github/workflows/build.yml | 2 +- e2e-tests/tests/react-native.test.ts | 6 +++--- e2e-tests/utils/index.ts | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9ad14159e..58cd05727 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -130,7 +130,7 @@ jobs: name: ${{ matrix.wizard }} E2E Tests (${{ matrix.os }}) needs: job_build runs-on: ${{ matrix.os }} - timeout-minutes: 40 + 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 3b9c651f8..f735fe91a 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.', ); @@ -193,12 +193,12 @@ defaults.url=https://sentry.io/`, expect(builds).toBe(true); }); - test('ios project builds correctly', { timeout: 2_400_000 }, async () => { + 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'); + 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 b855006c1..7f044ed57 100644 --- a/e2e-tests/utils/index.ts +++ b/e2e-tests/utils/index.ts @@ -584,7 +584,7 @@ export async function checkIfReactNativeReleaseBuilds( }); const builtSuccessfully = await testEnv.waitForStatusCode(0, { - timeout: 2_400_000, + timeout: 3_600_000, }); testEnv.kill(); From a5654ff19677df19ef8b9dd2fb7050c26363ddfc Mon Sep 17 00:00:00 2001 From: Antonis Lilis Date: Thu, 15 May 2025 15:34:44 +0300 Subject: [PATCH 10/11] Revert "Increase timeout and enable logs" This reverts commit 1ae610d74871f286b699ec739856ab66da54a4f7. --- .github/workflows/build.yml | 2 +- e2e-tests/tests/react-native.test.ts | 6 +++--- e2e-tests/utils/index.ts | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 58cd05727..9ad14159e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -130,7 +130,7 @@ jobs: name: ${{ matrix.wizard }} E2E Tests (${{ matrix.os }}) needs: job_build runs-on: ${{ matrix.os }} - timeout-minutes: 60 + timeout-minutes: 40 strategy: matrix: wizard: diff --git a/e2e-tests/tests/react-native.test.ts b/e2e-tests/tests/react-native.test.ts index f735fe91a..3b9c651f8 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, true); + const wizardInstance = startWizardInstance(integration, projectDir); const packageManagerPrompted = await wizardInstance.waitForOutput( 'Please select your package manager.', ); @@ -193,12 +193,12 @@ defaults.url=https://sentry.io/`, expect(builds).toBe(true); }); - test('ios project builds correctly', { timeout: 3_600_000 }, async () => { + test('ios project builds correctly', { timeout: 2_400_000 }, async () => { if (!podInstallPrompted) { // Skip this test if not on MacOS return; } - const builds = await checkIfReactNativeReleaseBuilds(projectDir, 'ios', true); + const builds = await checkIfReactNativeReleaseBuilds(projectDir, 'ios'); expect(builds).toBe(true); }); }); diff --git a/e2e-tests/utils/index.ts b/e2e-tests/utils/index.ts index 7f044ed57..b855006c1 100644 --- a/e2e-tests/utils/index.ts +++ b/e2e-tests/utils/index.ts @@ -584,7 +584,7 @@ export async function checkIfReactNativeReleaseBuilds( }); const builtSuccessfully = await testEnv.waitForStatusCode(0, { - timeout: 3_600_000, + timeout: 2_400_000, }); testEnv.kill(); From 8b65a9aa68d6199e9388e48d3d0cd32919a73562 Mon Sep 17 00:00:00 2001 From: Antonis Lilis Date: Thu, 15 May 2025 16:33:17 +0300 Subject: [PATCH 11/11] Reapply "Increase timeout and enable logs" This reverts commit a5654ff19677df19ef8b9dd2fb7050c26363ddfc. --- .github/workflows/build.yml | 2 +- e2e-tests/tests/react-native.test.ts | 6 +++--- e2e-tests/utils/index.ts | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9ad14159e..58cd05727 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -130,7 +130,7 @@ jobs: name: ${{ matrix.wizard }} E2E Tests (${{ matrix.os }}) needs: job_build runs-on: ${{ matrix.os }} - timeout-minutes: 40 + 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 3b9c651f8..f735fe91a 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.', ); @@ -193,12 +193,12 @@ defaults.url=https://sentry.io/`, expect(builds).toBe(true); }); - test('ios project builds correctly', { timeout: 2_400_000 }, async () => { + 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'); + 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 b855006c1..7f044ed57 100644 --- a/e2e-tests/utils/index.ts +++ b/e2e-tests/utils/index.ts @@ -584,7 +584,7 @@ export async function checkIfReactNativeReleaseBuilds( }); const builtSuccessfully = await testEnv.waitForStatusCode(0, { - timeout: 2_400_000, + timeout: 3_600_000, }); testEnv.kill();