Skip to content

Commit 20dfb9b

Browse files
authored
chore: CI and example app update (Vydia#315)
Updated CI Fixed iOS E2E tests Disabled Android E2E tests since too unreliable Co-authored-by: Marius Reimer <>
1 parent 3c0a0c8 commit 20dfb9b

File tree

80 files changed

+6122
-5981
lines changed

Some content is hidden

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

80 files changed

+6122
-5981
lines changed

.github/workflows/android.yml

Lines changed: 40 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -9,59 +9,67 @@ jobs:
99

1010
steps:
1111
- name: Checkout project
12-
uses: actions/checkout@v2
12+
uses: actions/checkout@v3
1313

1414
- name: Specify node version
15-
uses: actions/setup-node@v1
15+
uses: actions/setup-node@v3
1616
with:
17-
node-version: 12
17+
node-version: 16
1818

1919
- name: Use specific Java version for sdkmanager to work
20-
uses: joschi/setup-jdk@v2
20+
uses: actions/setup-java@v2
2121
with:
22-
java-version: 'openjdk8'
22+
distribution: 'temurin'
23+
java-version: '8'
2324
architecture: 'x64'
2425

2526
- name: Setup Android emulator
2627
run: |
27-
echo y | sudo $ANDROID_HOME/tools/bin/sdkmanager "system-images;android-27;google_apis;x86" > /dev/null
28-
$ANDROID_HOME/tools/bin/avdmanager -s create avd -n emu -k "system-images;android-27;google_apis;x86" -b "x86" -c 1G -d 7 -f
28+
echo y | sudo $ANDROID_HOME/tools/bin/sdkmanager "system-images;android-33;google_apis;x86_64" > /dev/null
29+
$ANDROID_HOME/tools/bin/avdmanager -s create avd -n emu -k "system-images;android-33;google_apis;x86_64" -b "x86_64" -c 1G -d 7 -f
2930
3031
- name: Install node_modules
3132
working-directory: example/RNBackgroundExample/
3233
run:
3334
yarn install --frozen-lockfile
3435

36+
- name: Use specific Java version for the build
37+
uses: actions/setup-java@v2
38+
with:
39+
distribution: 'temurin'
40+
java-version: '11'
41+
architecture: 'x64'
42+
3543
- name: Deploy
3644
working-directory: example/RNBackgroundExample/
3745
run:
3846
yarn e2e/deploy/android
3947

40-
- name: Start Emulator
41-
working-directory: example/RNBackgroundExample/
42-
timeout-minutes: 5
43-
run: |
44-
export PATH=$PATH:$ANDROID_HOME/platform-tools
45-
$ANDROID_HOME/emulator/emulator @emu -noaudio -no-boot-anim -netdelay none -accel on -no-snapshot &
48+
# - name: Start Emulator
49+
# working-directory: example/RNBackgroundExample/
50+
# timeout-minutes: 5
51+
# run: |
52+
# export PATH=$PATH:$ANDROID_HOME/platform-tools
53+
# $ANDROID_HOME/emulator/emulator @emu -noaudio -no-boot-anim -netdelay none -accel on -no-snapshot &
4654

47-
- name: Wait for emulator to be ready
48-
working-directory: example/RNBackgroundExample/
49-
timeout-minutes: 15
50-
run: |
51-
sh ./wait-for-emulator.sh
55+
# - name: Wait for emulator to be ready
56+
# working-directory: example/RNBackgroundExample/
57+
# timeout-minutes: 15
58+
# run: |
59+
# sh ./wait-for-emulator.sh
5260

53-
- name: Android test
54-
working-directory: example/RNBackgroundExample/
55-
timeout-minutes: 8
56-
run: |
57-
mkdir -p ./artifacts
58-
node e2e/start-server.js &
59-
adb reverse tcp:8080 tcp:8080
60-
yarn e2e/test/android --record-videos failing
61+
# - name: Android test
62+
# working-directory: example/RNBackgroundExample/
63+
# timeout-minutes: 8
64+
# run: |
65+
# mkdir -p ./artifacts
66+
# node e2e/start-server.js &
67+
# adb reverse tcp:8080 tcp:8080
68+
# yarn e2e/test/android --record-videos failing
6169

62-
- uses: actions/upload-artifact@master
63-
name: Provide videos of failed E2E tests
64-
if: failure()
65-
with:
66-
name: android-failing-e2e-videos
67-
path: example/RNBackgroundExample/artifacts
70+
# - uses: actions/upload-artifact@master
71+
# name: Provide videos of failed E2E tests
72+
# if: failure()
73+
# with:
74+
# name: android-failing-e2e-videos
75+
# path: example/RNBackgroundExample/artifacts

.github/workflows/deploy-release.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,17 @@ on:
77

88
jobs:
99
deploy-release:
10-
runs-on: ubuntu-18.04
10+
runs-on: ubuntu-22.04
1111
if: "!contains(github.event.head_commit.message, '[skip ci]')"
1212

1313
steps:
1414
- name: Checkout project
15-
uses: actions/checkout@v2
15+
uses: actions/checkout@v3
1616

1717
- name: Specify node version
18-
uses: actions/setup-node@v1
18+
uses: actions/setup-node@3
1919
with:
20-
node-version: 12
20+
node-version: 16
2121

2222
- name: Release to NPM
2323
if: github.ref == 'refs/heads/master'

.github/workflows/iOS.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ jobs:
99

1010
steps:
1111
- name: Checkout project
12-
uses: actions/checkout@v2
12+
uses: actions/checkout@v3
1313

1414
- name: Specify node version
15-
uses: actions/setup-node@v1
15+
uses: actions/setup-node@v3
1616
with:
17-
node-version: 12
17+
node-version: 16
1818

1919
- name: Setup Detox
2020
run: |
@@ -23,8 +23,9 @@ jobs:
2323
2424
- name: Install node_modules
2525
working-directory: example/RNBackgroundExample/
26-
run:
26+
run: |
2727
yarn install --frozen-lockfile
28+
npx pod-install ios
2829
2930
- name: Deploy
3031
working-directory: example/RNBackgroundExample/

.github/workflows/node.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,17 @@ on: [push, pull_request]
44

55
jobs:
66
node-lint-tests:
7-
runs-on: ubuntu-latest
7+
runs-on: ubuntu-22.04
88
if: "!contains(github.event.head_commit.message, '[skip ci]')"
99

1010
steps:
1111
- name: checkout
12-
uses: actions/checkout@v2
12+
uses: actions/checkout@v3
1313

1414
- name: setup node
15-
uses: actions/setup-node@v1
15+
uses: actions/setup-node@v3
1616
with:
17-
node-version: 12
17+
node-version: 16
1818

1919
- name: install node_modules
2020
run: yarn install --frozen-lockfile

example/RNBackgroundExample/.flowconfig

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,11 @@
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

14+
.*/node_modules/resolve/test/resolver/malformed_package_json/package\.json$
15+
1816
[untyped]
1917
.*/node_modules/@react-native-community/cli/.*/.*
2018

@@ -27,8 +25,9 @@ node_modules/react-native/flow/
2725
[options]
2826
emoji=true
2927

30-
esproposal.optional_chaining=enable
31-
esproposal.nullish_coalescing=enable
28+
exact_by_default=true
29+
30+
format.bracket_spacing=false
3231

3332
module.file_ext=.js
3433
module.file_ext=.json
@@ -44,10 +43,6 @@ suppress_type=$FlowFixMe
4443
suppress_type=$FlowFixMeProps
4544
suppress_type=$FlowFixMeState
4645

47-
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)
48-
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)?:? #[0-9]+
49-
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
50-
5146
[lints]
5247
sketchy-null-number=warn
5348
sketchy-null-mixed=warn
@@ -56,10 +51,7 @@ untyped-type-import=warn
5651
nonstrict-import=warn
5752
deprecated-type=warn
5853
unsafe-getters-setters=warn
59-
inexact-spread=warn
6054
unnecessary-invariant=warn
61-
signature-verification-failure=warn
62-
deprecated-utility=error
6355

6456
[strict]
6557
deprecated-type
@@ -71,4 +63,4 @@ untyped-import
7163
untyped-type-import
7264

7365
[version]
74-
^0.122.0
66+
^0.182.0

example/RNBackgroundExample/.gitattributes

Lines changed: 0 additions & 1 deletion
This file was deleted.

example/RNBackgroundExample/.gitignore

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ DerivedData
2020
*.hmap
2121
*.ipa
2222
*.xcuserstate
23+
ios/.xcode.env.local
2324

2425
# Android/IntelliJ
2526
#
@@ -28,6 +29,8 @@ build/
2829
.gradle
2930
local.properties
3031
*.iml
32+
*.hprof
33+
.cxx/
3134

3235
# node.js
3336
#
@@ -48,16 +51,14 @@ buck-out/
4851
# For more information about the recommended setup visit:
4952
# https://docs.fastlane.tools/best-practices/source-control/
5053

51-
*/fastlane/report.xml
52-
*/fastlane/Preview.html
53-
*/fastlane/screenshots
54+
**/fastlane/report.xml
55+
**/fastlane/Preview.html
56+
**/fastlane/screenshots
57+
**/fastlane/test_output
5458

5559
# Bundle artifact
5660
*.jsbundle
5761

58-
artifacts/
59-
60-
# CocoaPods
62+
# Ruby / CocoaPods
6163
/ios/Pods/
62-
63-
*.hprof
64+
/vendor/bundle/
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
module.exports = {
2+
arrowParens: 'avoid',
3+
bracketSameLine: true,
24
bracketSpacing: false,
3-
jsxBracketSameLine: true,
45
singleQuote: true,
56
trailingComma: 'all',
67
};

example/RNBackgroundExample/App.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,8 @@ const App: () => React$Node = () => {
145145
<SafeAreaView testID="main_screen">
146146
<ScrollView
147147
contentInsetAdjustmentBehavior="automatic"
148-
style={styles.scrollView}>
148+
style={styles.scrollView}
149+
>
149150
<Header />
150151
{global.HermesInternal == null ? null : (
151152
<View style={styles.engine}>
@@ -182,7 +183,8 @@ const App: () => React$Node = () => {
182183
.catch(err => {
183184
console.warn(err.message);
184185
});
185-
}}>
186+
}}
187+
>
186188
<Text>10 Sec Delay Success</Text>
187189
</TouchableOpacity>
188190

@@ -228,7 +230,8 @@ const App: () => React$Node = () => {
228230
.catch(err => {
229231
console.warn(err.message);
230232
});
231-
}}>
233+
}}
234+
>
232235
<Text>5 Sec Delay Error</Text>
233236
</TouchableOpacity>
234237

example/RNBackgroundExample/Gemfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
source 'https://rubygems.org'
2+
3+
# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
4+
ruby '2.7.5'
5+
6+
gem 'cocoapods', '~> 1.11', '>= 1.11.2'
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
BUNDLE_PATH: "vendor/bundle"
2+
BUNDLE_FORCE_RUBY_PLATFORM: 1
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
16
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2.7.5

0 commit comments

Comments
 (0)