Skip to content

Commit dc9da2b

Browse files
authored
chore(build-system-tests): reduce frequency of RN tests (#6538)
1 parent 967559a commit dc9da2b

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

.github/workflows/build-system-test-react-native.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ permissions:
77

88
on:
99
schedule:
10-
- cron: '0 * * * *' # Run at the first minute of every hour
10+
- cron: '0 */2 * * *' # Run on the first minute of each even numbered hour
1111

1212
jobs:
1313
build:

.github/workflows/reusable-build-system-test-react-native.yml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ jobs:
1616
fail-fast: false
1717
matrix:
1818
framework: [react-native]
19-
framework-version: [
20-
# uncomment to enable
19+
framework-version:
20+
[
2121
{ formatted: latest, value: latest },
2222
{ formatted: 078, value: 0.78 },
2323
{ formatted: 077, value: 0.77 },
@@ -134,6 +134,7 @@ jobs:
134134
restore-keys: pods-${{ hashFiles('examples/react-native/ios/Podfile.lock') }}
135135
env:
136136
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 1
137+
137138
- name: Restore node_modules cache
138139
if: ${{ matrix.platform == 'ios' }}
139140
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 https://github.com/actions/cache/commit/1bd1e32a3bdc45362d1e726936510720a7c30a57
@@ -145,6 +146,7 @@ jobs:
145146
key: ${{ runner.os }}-nodemodules
146147
env:
147148
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 3
149+
148150
- name: Install Java 17
149151
if: ${{ matrix.platform == 'android' }}
150152
uses: actions/setup-java@de1bb2b0c5634f0fc4438d7aa9944e68f9bf86cc # 3.6.0
@@ -162,6 +164,7 @@ jobs:
162164
echo "ruby --version"
163165
ruby --version
164166
continue-on-error: true # brew overwrite step addresses a python install issue: https://github.com/actions/runner-images/issues/8500
167+
165168
- name: Update CocoaPods
166169
if: ${{ matrix.platform == 'ios' }}
167170
run: |
@@ -173,16 +176,13 @@ jobs:
173176
run: |
174177
echo -e "echo \$ANDROID_HOME"
175178
echo $ANDROID_HOME
176-
$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --install 'build-tools;33.0.2' platform-tools
177-
echo "y" | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --install "system-images;android-27;default;x86_64"
178-
echo "no" | $ANDROID_HOME/cmdline-tools/latest/bin/avdmanager create avd --force --name Pixel_5_API_27 --device "pixel_5" --abi x86_64 --package "system-images;android-27;default;x86_64"
179-
printf 'hw.cpu.ncore=2\n' >> ~/.android/avd/Pixel_5_API_27.avd/config.ini
180-
printf 'hw.ramSize=2048\n' >> ~/.android/avd/Pixel_5_API_27.avd/config.ini
181-
printf 'hw.heapSize=576\n' >> ~/.android/avd/Pixel_5_API_27.avd/config.ini
179+
$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --install "build-tools;33.0.2" "platform-tools" "system-images;android-27;default;x86_64"
180+
$ANDROID_HOME/cmdline-tools/latest/bin/avdmanager create avd --name Pixel_5_API_27 --force --device "pixel_5" --abi x86_64 --package "system-images;android-27;default;x86_64"
181+
182182
- name: Start Android emulator
183183
if: ${{ matrix.platform == 'android' }}
184184
run: |
185-
nohup $ANDROID_HOME/emulator/emulator -avd Pixel_5_API_27 -port ${{ env.EMULATOR_PORT }} -no-boot-anim -no-audio -no-snapshot-load -gpu host -accel on &
185+
$ANDROID_HOME/emulator/emulator -avd Pixel_5_API_27 -port ${{ env.EMULATOR_PORT }} -no-boot-anim -no-audio -no-snapshot-load -gpu host -accel on &
186186
$ANDROID_HOME/platform-tools/adb wait-for-device shell 'while [[ -z $(getprop sys.boot_completed | tr -d '\r') ]]; do sleep 1; done; input keyevent 82'
187187
$ANDROID_HOME/platform-tools/adb devices
188188
# disable spell checker
@@ -196,6 +196,7 @@ jobs:
196196
run: npm run setup:${{matrix.framework}}:${{matrix.build-tool}} -- --name ${{ env.MEGA_APP_NAME }} --platform ${{matrix.platform}} --tag ${{inputs.dist-tag}} --framework-version ${{matrix.framework-version.value}} --build-tool-version ${{matrix.build-tool-version}}
197197
shell: bash
198198
working-directory: build-system-tests
199+
199200
- name: Detect Mega App Error in Log
200201
run: npm run checkReactNativeLogs -- --log-file-name ${{ matrix.logfile }} --mega-app-name ${{ env.MEGA_APP_NAME }} --platform ${{ matrix.platform }}
201202
shell: bash

0 commit comments

Comments
 (0)