From dcf54b6cd5df4fa5ea68695305d5be27977303f0 Mon Sep 17 00:00:00 2001 From: Yousif Ahmed Date: Thu, 19 Sep 2024 09:20:17 +0100 Subject: [PATCH] ci(react-native-navigation): add react-native-navigation tests to full CI pipeline --- .../react-native-android-pipeline.full.yml | 120 ++++++++++++++++++ .../full/react-native-ios-pipeline.full.yml | 118 +++++++++++++++++ docker-compose.yml | 1 + .../features/react-native-navigation.feature | 2 +- test/react-native/features/support/env.rb | 4 + 5 files changed, 244 insertions(+), 1 deletion(-) diff --git a/.buildkite/full/react-native-android-pipeline.full.yml b/.buildkite/full/react-native-android-pipeline.full.yml index f72c44f87..22cbbc3ec 100644 --- a/.buildkite/full/react-native-android-pipeline.full.yml +++ b/.buildkite/full/react-native-android-pipeline.full.yml @@ -185,6 +185,56 @@ steps: - exit_status: "*" limit: 1 + - label: ':android: Build react-native-navigation {{matrix}} test fixture APK (Old Arch)' + key: "build-react-native-navigation-android-fixture-old-arch" + timeout_in_minutes: 30 + agents: + queue: macos-14 + env: + JAVA_VERSION: "17" + NODE_VERSION: "18" + RN_VERSION: "{{matrix}}" + RCT_NEW_ARCH_ENABLED: "0" + BUILD_ANDROID: "true" + REACT_NATIVE_NAVIGATION: "true" + artifact_paths: + - "test/react-native/features/fixtures/generated/react-native-navigation/old-arch/**/reactnative.apk" + commands: + - "bundle install" + - "node scripts/generate-react-native-fixture.js" + matrix: + - "0.71" + - "0.72" + retry: + automatic: + - exit_status: "*" + limit: 1 + + - label: ':android: Build react-native-navigation {{matrix}} test fixture APK (New Arch)' + key: "build-react-native-navigation-android-fixture-new-arch" + timeout_in_minutes: 30 + agents: + queue: macos-14 + env: + JAVA_VERSION: "17" + NODE_VERSION: "18" + RN_VERSION: "{{matrix}}" + RCT_NEW_ARCH_ENABLED: "1" + BUILD_ANDROID: "true" + REACT_NATIVE_NAVIGATION: "true" + artifact_paths: + - "test/react-native/features/fixtures/generated/react-native-navigation/new-arch/**/reactnative.apk" + commands: + - "bundle install" + - "node scripts/generate-react-native-fixture.js" + retry: + automatic: + - exit_status: "*" + limit: 1 + matrix: + - "0.71" + - "0.72" + # # End-to-end tests # @@ -424,3 +474,73 @@ steps: concurrency: 25 concurrency_group: 'bitbar' concurrency_method: eager + + - label: ":bitbar: :android: react-native-navigation {{matrix}} Android 12 (Old Arch) end-to-end tests" + depends_on: "build-react-native-navigation-android-fixture-old-arch" + timeout_in_minutes: 60 + plugins: + artifacts#v1.9.0: + download: "test/react-native/features/fixtures/generated/react-native-navigation/old-arch/{{matrix}}/reactnative.apk" + upload: ./test/react-native/maze_output/**/* + docker-compose#v4.12.0: + pull: react-native-maze-runner + run: react-native-maze-runner + service-ports: true + command: + - --app=/app/features/fixtures/generated/react-native-navigation/old-arch/{{matrix}}/reactnative.apk + - --farm=bb + - --device=ANDROID_12 + - --appium-version=1.22 + - --a11y-locator + - --fail-fast + - --no-tunnel + - --aws-public-ip + - features/react-native-navigation.feature + retry: + manual: + permit_on_passed: true + env: + RN_VERSION: "{{matrix}}" + RCT_NEW_ARCH_ENABLED: "0" + REACT_NATIVE_NAVIGATION: "true" + concurrency: 25 + concurrency_group: "bitbar" + concurrency_method: eager + matrix: + - "0.71" + - "0.72" + + - label: ":bitbar: :android: react-native-navigation {{matrix}} Android 12 (New Arch) end-to-end tests" + depends_on: "build-react-native-navigation-android-fixture-new-arch" + timeout_in_minutes: 60 + plugins: + artifacts#v1.9.0: + download: "test/react-native/features/fixtures/generated/react-native-navigation/new-arch/{{matrix}}/reactnative.apk" + upload: ./test/react-native/maze_output/**/* + docker-compose#v4.12.0: + pull: react-native-maze-runner + run: react-native-maze-runner + service-ports: true + command: + - --app=/app/features/fixtures/generated/react-native-navigation/new-arch/{{matrix}}/reactnative.apk + - --farm=bb + - --device=ANDROID_12 + - --appium-version=1.22 + - --a11y-locator + - --fail-fast + - --no-tunnel + - --aws-public-ip + - features/react-native-navigation.feature + retry: + manual: + permit_on_passed: true + env: + RCT_NEW_ARCH_ENABLED: "1" + RN_VERSION: "{{matrix}}" + REACT_NATIVE_NAVIGATION: "true" + concurrency: 25 + concurrency_group: "bitbar" + concurrency_method: eager + matrix: + - "0.71" + - "0.72" diff --git a/.buildkite/full/react-native-ios-pipeline.full.yml b/.buildkite/full/react-native-ios-pipeline.full.yml index 6aae9ec86..b8edb81ee 100644 --- a/.buildkite/full/react-native-ios-pipeline.full.yml +++ b/.buildkite/full/react-native-ios-pipeline.full.yml @@ -164,6 +164,56 @@ steps: - exit_status: "*" limit: 1 + - label: ':mac: Build react-native-navigation {{matrix}} test fixture ipa (Old Arch)' + key: "build-react-native-navigation-ios-fixture-old-arch" + timeout_in_minutes: 30 + agents: + queue: "macos-14" + env: + NODE_VERSION: "18" + RN_VERSION: "{{matrix}}" + RCT_NEW_ARCH_ENABLED: "0" + BUILD_IOS: "true" + XCODE_VERSION: "15.3.0" + REACT_NATIVE_NAVIGATION: "true" + artifact_paths: + - "test/react-native/features/fixtures/generated/react-native-navigation/old-arch/**/output/reactnative.ipa" + commands: + - "bundle install" + - "node scripts/generate-react-native-fixture.js" + matrix: + - "0.71" + - "0.72" + retry: + automatic: + - exit_status: "*" + limit: 1 + + - label: ':mac: Build react-native-navigation {{matrix}} test fixture ipa (New Arch)' + key: "build-react-native-navigation-ios-fixture-new-arch" + timeout_in_minutes: 30 + agents: + queue: "macos-14" + env: + NODE_VERSION: "18" + RN_VERSION: "{{matrix}}" + RCT_NEW_ARCH_ENABLED: "1" + BUILD_IOS: "true" + XCODE_VERSION: "15.3.0" + REACT_NATIVE_NAVIGATION: "true" + artifact_paths: + - "test/react-native/features/fixtures/generated/react-native-navigation/new-arch/**/output/reactnative.ipa" + commands: + - "bundle install" + - "node scripts/generate-react-native-fixture.js" + matrix: + - "0.71" + - "0.72" + retry: + automatic: + - exit_status: "*" + limit: 1 + # # End-to-end tests # @@ -385,3 +435,71 @@ steps: concurrency: 5 concurrency_group: "browserstack-app" concurrency_method: eager + + - label: ":bitbar: :mac: react-native-navigation {{matrix}} iOS 16 (Old Arch) end-to-end tests" + depends_on: "build-react-native-navigation-ios-fixture-old-arch" + timeout_in_minutes: 60 + plugins: + artifacts#v1.9.0: + download: "test/react-native/features/fixtures/generated/react-native-navigation/old-arch/{{matrix}}/output/reactnative.ipa" + upload: ./test/react-native/maze_output/**/* + docker-compose#v4.12.0: + pull: react-native-maze-runner + run: react-native-maze-runner + service-ports: true + command: + - --app=/app/features/fixtures/generated/react-native-navigation/old-arch/{{matrix}}/output/reactnative.ipa + - --farm=bb + - --device=IOS_16 + - --a11y-locator + - --fail-fast + - --no-tunnel + - --aws-public-ip + - features/react-native-navigation.feature + retry: + manual: + permit_on_passed: true + env: + RN_VERSION: "{{matrix}}" + RCT_NEW_ARCH_ENABLED: "0" + REACT_NATIVE_NAVIGATION: "true" + concurrency: 25 + concurrency_group: "bitbar" + concurrency_method: eager + matrix: + - "0.71" + - "0.72" + + - label: ":bitbar: :mac: react-native-navigation {{matrix}} iOS 16 (New Arch) end-to-end tests" + depends_on: "build-react-native-navigation-ios-fixture-new-arch" + timeout_in_minutes: 60 + plugins: + artifacts#v1.9.0: + download: "test/react-native/features/fixtures/generated/react-native-navigation/new-arch/{{matrix}}/output/reactnative.ipa" + upload: ./test/react-native/maze_output/**/* + docker-compose#v4.12.0: + pull: react-native-maze-runner + run: react-native-maze-runner + service-ports: true + command: + - --app=/app/features/fixtures/generated/react-native-navigation/new-arch/{{matrix}}/output/reactnative.ipa + - --farm=bb + - --device=IOS_16 + - --a11y-locator + - --fail-fast + - --no-tunnel + - --aws-public-ip + - features/react-native-navigation.feature + env: + RCT_NEW_ARCH_ENABLED: "1" + RN_VERSION: "{{matrix}}" + REACT_NATIVE_NAVIGATION: "true" + retry: + manual: + permit_on_passed: true + concurrency: 25 + concurrency_group: "bitbar" + concurrency_method: eager + matrix: + - "0.71" + - "0.72" \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index b9c64006e..185ca0052 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -172,6 +172,7 @@ services: BITBAR_ACCESS_KEY: HERMES: RN_VERSION: + REACT_NATIVE_NAVIGATION: ports: - "9000-9499:9339" networks: diff --git a/test/react-native/features/react-native-navigation.feature b/test/react-native/features/react-native-navigation.feature index 3879d096e..de1c3bc99 100644 --- a/test/react-native/features/react-native-navigation.feature +++ b/test/react-native/features/react-native-navigation.feature @@ -1,4 +1,4 @@ -@navigation @skip_new_arch +@navigation @react-native-navigation Feature: Navigation plugin features Scenario: Navigating screens causes breadcrumbs and context to be updated diff --git a/test/react-native/features/support/env.rb b/test/react-native/features/support/env.rb index 7bcdffc58..63a3253da 100644 --- a/test/react-native/features/support/env.rb +++ b/test/react-native/features/support/env.rb @@ -25,6 +25,10 @@ skip_this_scenario("Skipping scenario") if ENV['SKIP_NAVIGATION_SCENARIOS'].eql?('true') end +Before('@react-native-navigation') do |scenario| + skip_this_scenario("Skipping scenario") unless ENV['REACT_NATIVE_NAVIGATION'].eql?('true') +end + # Require until PLAT-8236 is implemented Before('@skip_hermes') do |_scenario| skip_this_scenario("Skipping scenario") if ENV['HERMES'].eql?('true')