Skip to content

Commit c7ead6d

Browse files
Merge branch 'kw-fix-ios-app-archive' into kw-add-release-action
2 parents e5a0636 + ecabbbc commit c7ead6d

27 files changed

+864
-406
lines changed

.github/workflows/build-android.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
name: Android
22

3+
env:
4+
APK_PATH: android/app/build/outputs/apk/release/app-release.apk
5+
36
jobs:
47
build-android:
58
name: Android
@@ -29,5 +32,5 @@ jobs:
2932
uses: actions/upload-artifact@v4
3033
with:
3134
name: empower-plant-react-native-android
32-
path: android/app/build/outputs/apk/release/app-release.apk
35+
path: ${{ env.APK_PATH }}
3336
retention-days: 60

.github/workflows/build-ios.yml

Lines changed: 53 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,62 @@
11
name: iOS
22

3+
env:
4+
APP_ARCHIVE_PATH: sentry_react_native.app.zip
5+
36
jobs:
47
build-ios:
58
name: iOS
69
runs-on: macos-14
710
steps:
811
- uses: actions/checkout@v4
912

10-
- uses: actions/setup-node@v4
11-
with:
12-
node-version: 18
13-
cache: 'npm'
14-
cache-dependency-path: package-lock.json
15-
16-
- run: npm ci
17-
18-
- uses: ruby/setup-ruby@v1
19-
with:
20-
ruby-version: '3.3.0'
21-
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
22-
23-
- working-directory: ios
24-
run: bundle exec pod install
25-
26-
- name: Run xcodebuild
27-
working-directory: ios
28-
run: |
29-
mkdir -p "DerivedData"
30-
derivedData="$(cd "DerivedData" ; pwd -P)"
31-
set -o pipefail && xcodebuild \
32-
-workspace sentry_react_native.xcworkspace \
33-
-configuration "Release" \
34-
-scheme sentry_react_native \
35-
-destination 'generic/platform=iOS Simulator' \
36-
-derivedDataPath "$derivedData" \
37-
build \
38-
| tee xcodebuild.log \
39-
| xcbeautify --quieter --is-ci --disable-colored-output
40-
41-
- name: Upload APP
42-
uses: actions/upload-artifact@v4
43-
with:
44-
name: empower-plant-react-native-ios
45-
path: ios/DerivedData/Build/Products/Release-iphonesimulator/sentry_react_native.app
46-
retention-days: 60
47-
48-
- name: Upload logs
49-
if: ${{ always() }}
50-
uses: actions/upload-artifact@v4
51-
with:
52-
name: build-ios-logs
53-
path: ios/xcodebuild.log
13+
- uses: actions/setup-node@v4
14+
with:
15+
node-version: 18
16+
cache: 'npm'
17+
cache-dependency-path: package-lock.json
18+
19+
- run: npm ci
20+
21+
- uses: ruby/setup-ruby@v1
22+
with:
23+
ruby-version: '3.3.0'
24+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
25+
26+
- working-directory: ios
27+
run: bundle exec pod install
28+
29+
- name: Run xcodebuild
30+
working-directory: ios
31+
run: |
32+
mkdir -p "DerivedData"
33+
derivedData="$(cd "DerivedData" ; pwd -P)"
34+
set -o pipefail && xcodebuild \
35+
-workspace sentry_react_native.xcworkspace \
36+
-configuration "Release" \
37+
-scheme sentry_react_native \
38+
-destination 'generic/platform=iOS Simulator' \
39+
-derivedDataPath "$derivedData" \
40+
build \
41+
| tee xcodebuild.log \
42+
| xcbeautify --quieter --is-ci --disable-colored-output
43+
44+
- name: Archive App
45+
run: |
46+
zip -r \
47+
${{ env.APP_ARCHIVE_PATH }} \
48+
ios/DerivedData/Build/Products/Release-iphonesimulator/sentry_react_native.app
49+
50+
- name: Upload APP
51+
uses: actions/upload-artifact@v4
52+
with:
53+
name: empower-plant-react-native-ios
54+
path: ${{ env.APP_ARCHIVE_PATH }}
55+
retention-days: 60
56+
57+
- name: Upload logs
58+
if: ${{ always() }}
59+
uses: actions/upload-artifact@v4
60+
with:
61+
name: build-ios-logs
62+
path: ios/xcodebuild.log

.github/workflows/build.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,7 @@ jobs:
2020

2121
build-ios:
2222
uses: ./.github/workflows/build-ios.yml
23+
24+
test:
25+
needs: build-android
26+
uses: ./.github/workflows/test.yml

.github/workflows/test.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: UI Test Android
2+
3+
env:
4+
MAESTRO_VERSION: 1.39.0
5+
6+
jobs:
7+
run-ui-test-android:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v4
11+
12+
- name: Setup KVM
13+
shell: bash
14+
run: |
15+
# check if virtualization is supported...
16+
sudo apt install -y --no-install-recommends cpu-checker coreutils && echo "CPUs=$(nproc --all)" && kvm-ok
17+
# allow access to KVM to run the emulator
18+
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' \
19+
| sudo tee /etc/udev/rules.d/99-kvm4all.rules
20+
sudo udevadm control --reload-rules
21+
sudo udevadm trigger --name-match=kvm
22+
23+
- name: Download APK artifact
24+
uses: actions/download-artifact@v4
25+
with:
26+
name: empower-plant-react-native-android
27+
28+
- name: Install Maestro
29+
uses: dniHze/maestro-test-action@bda8a93211c86d0a05b7a4597c5ad134566fbde4 # [email protected]
30+
with:
31+
maestro-version: ${{env.MAESTRO_VERSION}}
32+
33+
- name: Run tests
34+
uses: reactivecircus/android-emulator-runner@62dbb605bba737720e10b196cb4220d374026a6d # [email protected]
35+
with:
36+
api-level: 30
37+
force-avd-creation: false
38+
disable-animations: true
39+
disable-spellchecker: true
40+
target: 'aosp_atd'
41+
channel: canary # Necessary for ATDs
42+
emulator-options: >
43+
-no-window
44+
-no-snapshot-save
45+
-gpu swiftshader_indirect
46+
-noaudio
47+
-no-boot-anim
48+
-camera-back none
49+
-camera-front none
50+
-timezone US/Pacific
51+
script: |
52+
adb install -r -d app-release.apk
53+
maestro test maestro --debug-output maestro-logs --env=APP_ID=com.sentry_react_native

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,3 +64,6 @@ yarn-error.log
6464
/coverage
6565

6666
.env
67+
.yalc
68+
yalc.lock
69+
.sentry

ios/Podfile.lock

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1211,11 +1211,29 @@ PODS:
12111211
- ReactCommon/turbomodule/bridging
12121212
- ReactCommon/turbomodule/core
12131213
- Yoga
1214-
- RNSentry (5.22.2):
1214+
- RNSentry (6.5.0):
1215+
- DoubleConversion
1216+
- glog
12151217
- hermes-engine
1218+
- RCT-Folly (= 2024.01.01.00)
1219+
- RCTRequired
1220+
- RCTTypeSafety
1221+
- React-Codegen
12161222
- React-Core
1223+
- React-debug
1224+
- React-Fabric
1225+
- React-featureflags
1226+
- React-graphics
12171227
- React-hermes
1218-
- Sentry/HybridSDK (= 8.25.0)
1228+
- React-ImageManager
1229+
- React-NativeModulesApple
1230+
- React-RCTFabric
1231+
- React-rendererdebug
1232+
- React-utils
1233+
- ReactCommon/turbomodule/bridging
1234+
- ReactCommon/turbomodule/core
1235+
- Sentry/HybridSDK (= 8.43.0)
1236+
- Yoga
12191237
- RNVectorIcons (10.1.0):
12201238
- DoubleConversion
12211239
- glog
@@ -1237,7 +1255,7 @@ PODS:
12371255
- ReactCommon/turbomodule/bridging
12381256
- ReactCommon/turbomodule/core
12391257
- Yoga
1240-
- Sentry/HybridSDK (8.25.0)
1258+
- Sentry/HybridSDK (8.43.0)
12411259
- SocketRocket (0.7.0)
12421260
- Yoga (0.0.0)
12431261

@@ -1491,9 +1509,9 @@ SPEC CHECKSUMS:
14911509
ReactCommon: f42444e384d82ab89184aed5d6f3142748b54768
14921510
RNGestureHandler: 2282cfbcf86c360d29f44ace393203afd5c6cff7
14931511
RNScreens: b32a9ff15bea7fcdbe5dff6477bc503f792b1208
1494-
RNSentry: f6a5aee809d646763640130714d1fdfe69aac36b
1512+
RNSentry: aa75421e670b184b645fdd70a03c480056dc5bb4
14951513
RNVectorIcons: 2a2f79274248390b80684ea3c4400bd374a15c90
1496-
Sentry: cd86fc55628f5b7c572cabe66cc8f95a9d2f165a
1514+
Sentry: 532b281a53b1b45a523fd592f608956fb36e577c
14971515
SocketRocket: abac6f5de4d4d62d24e11868d7a2f427e0ef940d
14981516
Yoga: 348f8b538c3ed4423eb58a8e5730feec50bce372
14991517

ios/sentry_react_native.xcodeproj/project.pbxproj

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -604,7 +604,10 @@
604604
"-DFOLLY_CFG_NO_COROUTINES=1",
605605
"-DFOLLY_HAVE_CLOCK_GETTIME=1",
606606
);
607-
OTHER_LDFLAGS = "$(inherited) ";
607+
OTHER_LDFLAGS = (
608+
"$(inherited)",
609+
" ",
610+
);
608611
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
609612
SDKROOT = iphoneos;
610613
USE_HERMES = true;
@@ -677,7 +680,10 @@
677680
"-DFOLLY_CFG_NO_COROUTINES=1",
678681
"-DFOLLY_HAVE_CLOCK_GETTIME=1",
679682
);
680-
OTHER_LDFLAGS = "$(inherited) ";
683+
OTHER_LDFLAGS = (
684+
"$(inherited)",
685+
" ",
686+
);
681687
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
682688
SDKROOT = iphoneos;
683689
USE_HERMES = true;

maestro/buyPlant.yaml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
appId: ${APP_ID}
2+
---
3+
- launchApp
4+
- assertVisible: "Empower Plant"
5+
- waitForAnimationToEnd
6+
- assertVisible: "Botana Voice"
7+
- tapOn:
8+
text: "Add to cart"
9+
below:
10+
text: "Botana Voice"
11+
repeat: 3
12+
- tapOn:
13+
text: "Add to cart"
14+
below:
15+
text: "Plant Mood"
16+
- tapOn:
17+
id: "bottom-tab-cart"
18+
- assertVisible: "CartScreen"
19+
- scroll
20+
- tapOn:
21+
text: "Delete"
22+
below:
23+
text: "Botana Voice"
24+
- tapOn: "Checkout"
25+
- tapOn: "email"
26+
- scroll
27+
- tapOn:
28+
text: "Place your order"
29+
repeat: 3

metro.config.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,6 @@ const userConfig = {};
1111

1212
const config = mergeConfig(getDefaultConfig(__dirname), userConfig);
1313

14-
module.exports = withSentryConfig(config);
14+
module.exports = withSentryConfig(config, {
15+
annotateReactComponents: true,
16+
});

0 commit comments

Comments
 (0)