Repository navigation
188 lines (169 loc) · 6.6 KB
/
Copy pathtest-ios.yml
File metadata and controls
188 lines (169 loc) · 6.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
name: Test iOS
on:
workflow_call:
outputs:
rntester-result:
description: The result of the test_rntester job
value: ${{ jobs.test_rntester.result }}
jobs:
prebuild_dependencies:
uses: ./.github/workflows/prebuild-ios-dependencies.yml
secrets: inherit
prebuild_core:
uses: ./.github/workflows/prebuild-ios-core.yml
with:
use-hermes-prebuilt: ${{ !endsWith(github.ref_name, '-stable') }}
secrets: inherit
needs: [prebuild_dependencies]
test_rntester:
runs-on: xcode-27
needs: [prebuild_dependencies, prebuild_core]
strategy:
fail-fast: false
matrix:
flavor: [Debug, Release]
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Run it
uses: ./.github/actions/test-ios-rntester
with:
flavor: ${{ matrix.flavor }}
# The CocoaPods opt-out stays supported, so CI keeps one CocoaPods build per test app.
test_rntester_cocoapods:
runs-on: xcode-27
needs: [prebuild_dependencies, prebuild_core]
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Run it
uses: ./.github/actions/test-ios-rntester
with:
flavor: Debug
dependency-manager: cocoapods
test_e2e_rntester:
needs: test_rntester
uses: ./.github/workflows/e2e-ios-rntester.yml
secrets: inherit
# Each flow already gets a retry inside the job, so a flow that failed is
# reported straight away. These retries only re-run jobs that stopped before
# running every flow, and they skip flows that already passed.
test_e2e_rntester_retry_1:
needs: test_e2e_rntester
if: ${{ always() && needs.test_e2e_rntester.outputs.retryable == 'true' }}
uses: ./.github/workflows/e2e-ios-rntester.yml
with:
retry-attempt: 1
secrets: inherit
test_e2e_rntester_retry_2:
needs: test_e2e_rntester_retry_1
if: ${{ always() && needs.test_e2e_rntester_retry_1.outputs.retryable == 'true' }}
uses: ./.github/workflows/e2e-ios-rntester.yml
with:
fail-on-error: true
retry-attempt: 2
secrets: inherit
test_visual_rntester:
needs: test_rntester
uses: ./.github/workflows/visual-capture-rntester.yml
with:
platform: ios
build_npm_package:
runs-on: 8-core-ubuntu
needs: [prebuild_dependencies, prebuild_core]
container:
image: reactnativecommunity/react-native-android:latest
env:
TERM: 'dumb'
# Set the encoding to resolve a known character encoding issue with decompressing tar.gz files in containers
# via Gradle: https://github.com/gradle/gradle/issues/23391#issuecomment-1878979127
LC_ALL: C.UTF8
GRADLE_OPTS: '-Dorg.gradle.daemon=false'
REACT_NATIVE_DOWNLOADS_DIR: /opt/react-native-downloads
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Build NPM Package
uses: ./.github/actions/build-npm-package
with:
release-type: dry-run
gradle-cache-encryption-key: ${{ secrets.GRADLE_CACHE_ENCRYPTION_KEY }}
build_templateapp:
needs: [build_npm_package, prebuild_dependencies, prebuild_core]
uses: ./.github/workflows/build-ios-templateapp.yml
secrets: inherit
build_templateapp_retry_1:
needs: build_templateapp
if: ${{ !cancelled() && (needs.build_templateapp.outputs.status == 'failure' || needs.build_templateapp.result == 'failure') }}
uses: ./.github/workflows/build-ios-templateapp.yml
with:
flavors: ${{ needs.build_templateapp.outputs.failed-flavors || '["Debug", "Release"]' }}
previous-results: ${{ needs.build_templateapp.outputs.results || '{}' }}
secrets: inherit
build_templateapp_retry_2:
needs: build_templateapp_retry_1
if: ${{ !cancelled() && (needs.build_templateapp_retry_1.outputs.status == 'failure' || needs.build_templateapp_retry_1.result == 'failure') }}
uses: ./.github/workflows/build-ios-templateapp.yml
with:
flavors: ${{ needs.build_templateapp_retry_1.outputs.failed-flavors || '["Debug", "Release"]' }}
previous-results: ${{ needs.build_templateapp_retry_1.outputs.results || '{}' }}
fail-on-error: true
secrets: inherit
test_e2e_templateapp:
needs:
[build_templateapp, build_templateapp_retry_1, build_templateapp_retry_2]
if: ${{ !cancelled() && (needs.build_templateapp.outputs.status == 'success' || needs.build_templateapp_retry_1.outputs.status == 'success' || needs.build_templateapp_retry_2.outputs.status == 'success') }}
uses: ./.github/workflows/e2e-ios-templateapp.yml
secrets: inherit
test_e2e_templateapp_retry_1:
needs: test_e2e_templateapp
if: ${{ !cancelled() && (needs.test_e2e_templateapp.outputs.status == 'failure' || needs.test_e2e_templateapp.result == 'failure') }}
uses: ./.github/workflows/e2e-ios-templateapp.yml
with:
flavors: ${{ needs.test_e2e_templateapp.outputs.failed-flavors || '["Debug", "Release"]' }}
previous-results: ${{ needs.test_e2e_templateapp.outputs.results || '{}' }}
retry-attempt: 1
secrets: inherit
test_e2e_templateapp_retry_2:
needs: test_e2e_templateapp_retry_1
if: ${{ !cancelled() && (needs.test_e2e_templateapp_retry_1.outputs.status == 'failure' || needs.test_e2e_templateapp_retry_1.result == 'failure') }}
uses: ./.github/workflows/e2e-ios-templateapp.yml
with:
flavors: ${{ needs.test_e2e_templateapp_retry_1.outputs.failed-flavors || '["Debug", "Release"]' }}
previous-results: ${{ needs.test_e2e_templateapp_retry_1.outputs.results || '{}' }}
retry-attempt: 2
fail-on-error: true
secrets: inherit
test_spm_newapp:
needs: [build_npm_package, prebuild_dependencies, prebuild_core]
uses: ./.github/workflows/test-ios-spm-newapp.yml
secrets: inherit
test_helloworld:
runs-on: xcode-27
needs: [prebuild_dependencies, prebuild_core]
strategy:
matrix:
flavor: [Debug, Release]
env:
PROJECT_NAME: iOSTemplateProject
YARN_ENABLE_IMMUTABLE_INSTALLS: false
steps:
- name: Checkout
uses: actions/checkout@v6
- uses: ./.github/actions/test-ios-helloworld
with:
flavor: ${{ matrix.flavor }}
# The CocoaPods opt-out stays supported, so CI keeps one CocoaPods build per test app.
test_helloworld_cocoapods:
runs-on: xcode-27
needs: [prebuild_dependencies, prebuild_core]
env:
PROJECT_NAME: iOSTemplateProject
YARN_ENABLE_IMMUTABLE_INSTALLS: false
steps:
- name: Checkout
uses: actions/checkout@v6
- uses: ./.github/actions/test-ios-helloworld
with:
flavor: Debug
dependency-manager: cocoapods