Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.

Commit ca3fd56

Browse files
Migrate github actions to ADO (#2716)
* Create config yml for tests * Add setup for android tests * Remove unnecessary jobs * Remove support for outdated Ruby version * Add ios tests config; Modify npx react-native cmd * Replace ios stage with job * Revert changes on test.ts for npx * Fix typo in script * Remove github-actions yml
1 parent 7ef2e76 commit ca3fd56

File tree

2 files changed

+93
-70
lines changed

2 files changed

+93
-70
lines changed

.azurepipelines/test-rn-code-push.yml

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
trigger:
2+
- master
3+
4+
pr:
5+
- master
6+
7+
variables:
8+
- name: api-level
9+
value: '27'
10+
11+
pool:
12+
vmImage: 'macOS-12'
13+
14+
stages:
15+
- stage: RunTests
16+
displayName: 'Run Android & IOS tests'
17+
jobs:
18+
- job: TestAndroid
19+
timeoutInMinutes: 120
20+
displayName: 'Test android'
21+
steps:
22+
23+
- script: |
24+
adb devices
25+
displayName: 'Start adb server'
26+
27+
- script: |
28+
$ANDROID_HOME/tools/bin/sdkmanager "system-images;android-$(api-level);google_apis;x86"
29+
displayName: 'Download system image'
30+
31+
- script: |
32+
$ANDROID_HOME/tools/bin/avdmanager create avd --force --name TestEmulator --abi google_apis/x86 --package 'system-images;android-$(api-level);google_apis;x86' --device "Nexus 6P"
33+
displayName: 'Creating Android emulator'
34+
35+
- script: |
36+
$ANDROID_HOME/emulator/emulator -avd TestEmulator -noaudio -no-window -no-snapshot-save -no-boot-anim -memory 6144 &
37+
displayName: 'Start Android emulator'
38+
39+
- script: |
40+
$ANDROID_HOME/platform-tools/adb wait-for-device shell 'while [[ -z $(getprop sys.boot_completed | tr -d '\r') ]]; do sleep 1; done'
41+
displayName: 'Wait for emulator to boot'
42+
43+
- script: |
44+
adb shell settings put global window_animation_scale 0.0
45+
displayName: 'Disable animations and transitions'
46+
47+
- script: |
48+
adb shell settings put global transition_animation_scale 0.0
49+
displayName: 'Disable animations and transitions'
50+
51+
- script: |
52+
adb shell settings put global animator_duration_scale 0.0
53+
displayName: 'Disable animations and transitions'
54+
55+
56+
- task: JavaToolInstaller@0
57+
inputs:
58+
versionSpec: '11'
59+
jdkArchitectureOption: 'x64'
60+
jdkSourceOption: 'PreInstalled'
61+
displayName: 'Change Java version'
62+
63+
- script: |
64+
npm install
65+
displayName: 'Package Installation'
66+
67+
- script: |
68+
npm run build:tests && npm run test:setup:android
69+
displayName: 'Setup Android tests'
70+
71+
- script: |
72+
npm run test:fast:android
73+
displayName: 'Run Android test'
74+
75+
- job: TestIOS
76+
displayName: 'Test IOS'
77+
steps:
78+
79+
- script: |
80+
npm install
81+
displayName: 'Install dependencies'
82+
83+
- script: |
84+
npm run build:tests && npm run test:setup:ios
85+
displayName: 'Setup iOS tests'
86+
87+
- script: |
88+
npm run test:fast:ios
89+
displayName: 'Run tests'
90+
91+
92+
93+

.github/workflows/react-native-code-push-ci.yml

Lines changed: 0 additions & 70 deletions
This file was deleted.

0 commit comments

Comments
 (0)