Skip to content

Commit da12e92

Browse files
authored
chore: make CI green (#527)
BREAKING CHANGE: only Android API level >=21 (Android 5) and iOS >= 11 are supported�� apart from green CI, this fixed at least one bug as well
1 parent 244978e commit da12e92

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+3319
-2905
lines changed

.circleci/config.yml

Lines changed: 54 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,24 @@
11
version: 2.1
22

33
orbs:
4-
rn: react-native-community/[email protected]
4+
rn: react-native-community/[email protected]
5+
android: circleci/[email protected]
56

67
# - rn/yarn_install
78
# fails with Error untarring cache: Error extracting tarball /var/folders/bq/mjrgbpkx5h1g_b22fpv0tlzc0000gn/T/cache376822577 : tmp/yarn/: Cannot extract through symlink tmp/yarn tmp/yarn/v6/: Cannot extract through symlink tmp/yarn/v6 tmp/yarn/v6/.tmp/: Cannot extract through symlink tmp/yarn/v6/.tmp tmp/yarn/v6/npm-@babel-code-frame-7.8.3-33e25903d7481181534e12ec0a25f16b6fcf419e-integrity/: Cannot extract through symlink tmp/yarn/v6/npm-@babel-code-frame-7.8.3-33e25903d7481181534e12ec0a25f16b6fcf419e-integrity tmp/yarn/v6/npm-@babel-code-frame-7.8.3-33e25903d7481181534e12ec0a25f16b6fcf419e-integrity/node_modules/: Cannot extract through symlink tmp/yarn/v6/npm-@babel-code-frame-7.8.3-33e25903d7481181534e12ec0a25f16b6fcf419e-integrity/node_modules tmp/yarn/v6/npm-@babel-code-frame-7.8.3-33e25903d7481181534e12ec0a25f16b6fcf419e-integrity/node_modules/@babel/: Cannot extract through symlink tmp/yarn/v6/npm-@babel-code-frame-7.8.3-33e25903d7481181534e12ec0a25f16b6fcf419e-integrity/node_modules/@babel tmp/yarn/v6/npm-@babel-code-frame-7.8.3-33e25903d7481181534e12ec0a25f16b6fcf419e-integrity/node_modules/@babel/code-frame/: Cannot extract: exit status 1
89
# that is why we use yarn install --frozen-lockfile but that is SLOW! help us to fix this!
910

1011
jobs:
11-
checkout_code:
12+
analyse_js:
1213
executor:
1314
name: rn/linux_js
14-
node_version: '12.10.0'
15+
node_version: '14.17.0'
1516
steps:
1617
- checkout
17-
- persist_to_workspace:
18-
paths: .
19-
root: .
20-
analyse_js:
21-
executor: rn/linux_js
22-
steps:
23-
- attach_workspace:
24-
at: .
2518
# - rn/yarn_install
2619
# fails with Error untarring cache: Error extracting tarball /var/folders/bq/mjrgbpkx5h1g_b22fpv0tlzc0000gn/T/cache376822577 : tmp/yarn/: Cannot extract through symlink tmp/yarn tmp/yarn/v6/: Cannot extract through symlink tmp/yarn/v6 tmp/yarn/v6/.tmp/: Cannot extract through symlink tmp/yarn/v6/.tmp tmp/yarn/v6/npm-@babel-code-frame-7.8.3-33e25903d7481181534e12ec0a25f16b6fcf419e-integrity/: Cannot extract through symlink tmp/yarn/v6/npm-@babel-code-frame-7.8.3-33e25903d7481181534e12ec0a25f16b6fcf419e-integrity tmp/yarn/v6/npm-@babel-code-frame-7.8.3-33e25903d7481181534e12ec0a25f16b6fcf419e-integrity/node_modules/: Cannot extract through symlink tmp/yarn/v6/npm-@babel-code-frame-7.8.3-33e25903d7481181534e12ec0a25f16b6fcf419e-integrity/node_modules tmp/yarn/v6/npm-@babel-code-frame-7.8.3-33e25903d7481181534e12ec0a25f16b6fcf419e-integrity/node_modules/@babel/: Cannot extract through symlink tmp/yarn/v6/npm-@babel-code-frame-7.8.3-33e25903d7481181534e12ec0a25f16b6fcf419e-integrity/node_modules/@babel tmp/yarn/v6/npm-@babel-code-frame-7.8.3-33e25903d7481181534e12ec0a25f16b6fcf419e-integrity/node_modules/@babel/code-frame/: Cannot extract: exit status 1
2720
- run:
28-
command: yarn install --frozen-lockfile --ignore-engines
21+
command: yarn install --frozen-lockfile
2922
name: yarn install
3023
- run:
3124
command: yarn lint
@@ -36,84 +29,96 @@ jobs:
3629
- run:
3730
command: yarn test
3831
name: Jest
32+
3933
e2e_release_ios:
4034
executor:
4135
name: rn/macos
42-
xcode_version: '11.4.0'
36+
xcode_version: '13.1.0'
4337
steps:
44-
- attach_workspace:
45-
at: .
46-
- rn/setup_macos_executor:
47-
node_version: '12.10.0'
38+
- checkout
39+
- run:
40+
name: install applesimutils
41+
command: |
42+
HOMEBREW_NO_INSTALL_CLEANUP=1 HOMEBREW_NO_AUTO_UPDATE=1 brew tap wix/brew >/dev/null
43+
HOMEBREW_NO_INSTALL_CLEANUP=1 HOMEBREW_NO_AUTO_UPDATE=1 brew install applesimutils >/dev/null
4844
- rn/ios_simulator_start:
4945
device: 'iPhone 11'
5046
# - rn/yarn_install
5147
- run:
52-
command: yarn install --frozen-lockfile --ignore-engines
48+
command: yarn install --frozen-lockfile
5349
name: yarn install
5450
- rn/pod_install:
5551
pod_install_directory: 'example/ios'
52+
- run:
53+
command: curl https://raw.githubusercontent.com/facebook/react-native/6334ac35ac3cbc2c84b2d46d46ec118bf9bf714d/scripts/find-node.sh > node_modules/react-native/scripts/find-node.sh
54+
name: fix issue with nvm # will be fixed in RN 67 (https://github.com/react-native-community/upgrade-support/issues/138)
5655
- run:
5756
command: yarn detox:ios:build:release
58-
name: build for detox
57+
name: build app for e2e tests
5958
- run:
6059
command: yarn detox:ios:test:release
61-
name: test detox
60+
name: run e2e tests
6261
- store_artifacts:
6362
path: ./artifacts
63+
6464
e2e_release_android:
65-
# we need to use mac to run emulator with acceleration
66-
# see https://support.circleci.com/hc/en-us/articles/360000028928-Testing-with-Android-emulator-on-CircleCI-2-0
6765
executor:
68-
name: rn/macos
69-
xcode_version: '11.4.0'
66+
name: android/android-machine
67+
resource-class: large
7068
steps:
71-
- attach_workspace:
72-
at: .
73-
- rn/setup_macos_executor:
74-
node_version: '12.10.0'
75-
# - rn/yarn_install
69+
- checkout
7670
- run:
77-
command: yarn install --frozen-lockfile --ignore-engines
71+
name: change default node version
72+
command: |
73+
nvm install v15.11.0
74+
nvm alias default v15.11.0
75+
echo 'export PATH=/opt/circleci/.nvm/versions/node/v15.11.0/bin:$PATH' >> $BASH_ENV
76+
- android/create-avd:
77+
avd-name: TestingAVD
78+
system-image: system-images;android-29;default;x86
79+
install: true
80+
- android/start-emulator:
81+
avd-name: TestingAVD
82+
no-window: true
83+
restore-gradle-cache-prefix: v1a
84+
post-emulator-launch-assemble-command: "pwd"
85+
- android/disable-animations
86+
- run:
87+
command: npm install --global yarn
88+
name: install yarn
89+
- run:
90+
command: yarn install --frozen-lockfile
7891
name: yarn install
79-
- rn/android_emulator_start:
80-
logcat_grep: 'com.reactcommunity.rndatetimepicker'
8192
- run:
8293
command: yarn detox:android:build:release
83-
name: build for detox
94+
name: build app for e2e tests
8495
- run:
8596
command: yarn detox:android:test:release
86-
name: test detox
97+
name: run e2e tests
8798
- store_artifacts:
8899
path: ./artifacts
100+
89101
publish:
90-
executor: rn/linux_js
102+
executor:
103+
name: rn/linux_js
104+
node_version: '14.17.0'
91105
steps:
92-
- attach_workspace:
93-
at: .
106+
- checkout
94107
# - rn/yarn_install
95108
# fails with Error untarring cache: Error extracting tarball /var/folders/bq/mjrgbpkx5h1g_b22fpv0tlzc0000gn/T/cache376822577 : tmp/yarn/: Cannot extract through symlink tmp/yarn tmp/yarn/v6/: Cannot extract through symlink tmp/yarn/v6 tmp/yarn/v6/.tmp/: Cannot extract through symlink tmp/yarn/v6/.tmp tmp/yarn/v6/npm-@babel-code-frame-7.8.3-33e25903d7481181534e12ec0a25f16b6fcf419e-integrity/: Cannot extract through symlink tmp/yarn/v6/npm-@babel-code-frame-7.8.3-33e25903d7481181534e12ec0a25f16b6fcf419e-integrity tmp/yarn/v6/npm-@babel-code-frame-7.8.3-33e25903d7481181534e12ec0a25f16b6fcf419e-integrity/node_modules/: Cannot extract through symlink tmp/yarn/v6/npm-@babel-code-frame-7.8.3-33e25903d7481181534e12ec0a25f16b6fcf419e-integrity/node_modules tmp/yarn/v6/npm-@babel-code-frame-7.8.3-33e25903d7481181534e12ec0a25f16b6fcf419e-integrity/node_modules/@babel/: Cannot extract through symlink tmp/yarn/v6/npm-@babel-code-frame-7.8.3-33e25903d7481181534e12ec0a25f16b6fcf419e-integrity/node_modules/@babel tmp/yarn/v6/npm-@babel-code-frame-7.8.3-33e25903d7481181534e12ec0a25f16b6fcf419e-integrity/node_modules/@babel/code-frame/: Cannot extract: exit status 1
96109
- run:
97-
command: yarn install --frozen-lockfile --ignore-engines
110+
command: yarn install --frozen-lockfile
98111
name: yarn install
99112
- run:
100113
command: npx semantic-release
101114
name: Publish to NPM
102115

103-
104116
workflows:
105117
test:
106118
jobs:
107-
- checkout_code
108-
- analyse_js:
109-
requires:
110-
- checkout_code
111-
- e2e_release_ios:
112-
requires:
113-
- analyse_js
114-
- e2e_release_android:
115-
requires:
116-
- analyse_js
119+
- analyse_js
120+
- e2e_release_ios
121+
- e2e_release_android
117122
- publish:
118123
requires:
119124
- e2e_release_android

.flowconfig

Lines changed: 4 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,9 @@
88
; Ignore polyfills
99
node_modules/react-native/Libraries/polyfills/.*
1010

11-
; These should not be required directly
12-
; require from fbjs/lib instead: require('fbjs/lib/warning')
13-
node_modules/warning/.*
14-
1511
; Flow doesn't support platforms
1612
.*/Libraries/Utilities/LoadingView.js
1713

18-
; These should not be required directly
19-
; require from fbjs/lib instead: require('fbjs/lib/warning')
20-
node_modules/warning/.*
21-
22-
; Flow doesn't support platforms
23-
.*/Libraries/Utilities/HMRLoadingView.js
24-
2514
[untyped]
2615
.*/node_modules/@react-native-community/cli/.*/.*
2716

@@ -32,12 +21,11 @@ node_modules/react-native/interface.js
3221
node_modules/react-native/flow/
3322

3423
[options]
35-
module.system.node.resolve_dirname=node_modules
36-
module.system.node.resolve_dirname=src
3724
emoji=true
3825

39-
esproposal.optional_chaining=enable
40-
esproposal.nullish_coalescing=enable
26+
exact_by_default=true
27+
28+
format.bracket_spacing=false
4129

4230
module.file_ext=.js
4331
module.file_ext=.json
@@ -53,10 +41,6 @@ suppress_type=$FlowFixMe
5341
suppress_type=$FlowFixMeProps
5442
suppress_type=$FlowFixMeState
5543

56-
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)
57-
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)?:? #[0-9]+
58-
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
59-
6044
[lints]
6145
sketchy-null-number=warn
6246
sketchy-null-mixed=warn
@@ -65,10 +49,8 @@ untyped-type-import=warn
6549
nonstrict-import=warn
6650
deprecated-type=warn
6751
unsafe-getters-setters=warn
68-
inexact-spread=warn
6952
unnecessary-invariant=warn
7053
signature-verification-failure=warn
71-
deprecated-utility=error
7254

7355
[strict]
7456
deprecated-type
@@ -80,4 +62,4 @@ untyped-import
8062
untyped-type-import
8163

8264
[version]
83-
^0.113.0
65+
^0.158.0

0 commit comments

Comments
 (0)