Skip to content

Commit 59e297e

Browse files
authored
Merge pull request #105 from sentry-demos/antonis/reset-before-merge
Reset master before merge commit 0fd3bf7
2 parents a59889f + a0a00c0 commit 59e297e

37 files changed

+915
-1556
lines changed

.github/workflows/build-android.yml

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

.github/workflows/build-ios.yml

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

.github/workflows/build.yml

Lines changed: 132 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,144 @@ on:
66
- master
77
pull_request:
88

9+
env:
10+
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
11+
SENTRY_ALLOW_FAILURE: false
12+
MAESTRO_VERSION: 1.39.0
13+
914
concurrency:
1015
group: ${{ github.workflow }}-${{ github.ref }}
11-
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
16+
cancel-in-progress: true
1217

1318
jobs:
1419
build-android:
15-
name: 'Build Android'
16-
uses: ./.github/workflows/build-android.yml
17-
secrets: inherit
20+
name: Android
21+
runs-on: ubuntu-latest
22+
steps:
23+
- uses: actions/checkout@v4
24+
25+
- uses: actions/setup-node@v4
26+
with:
27+
node-version: 18
28+
cache: 'npm'
29+
cache-dependency-path: package-lock.json
30+
31+
- run: npm ci
32+
33+
- uses: actions/setup-java@v4
34+
with:
35+
java-version: '17'
36+
distribution: 'adopt'
37+
38+
- uses: gradle/gradle-build-action@v3
39+
40+
- working-directory: android
41+
run: ./gradlew :app:assembleRelease
42+
43+
- name: Upload APK
44+
uses: actions/upload-artifact@v4
45+
with:
46+
name: empower-plant-react-native-android
47+
path: android/app/build/outputs/apk/release/app-release.apk
48+
retention-days: 60
1849

1950
build-ios:
20-
name: 'Build iOS'
21-
uses: ./.github/workflows/build-ios.yml
22-
secrets: inherit
51+
name: iOS
52+
runs-on: macos-14
53+
steps:
54+
- uses: actions/checkout@v4
55+
56+
- uses: actions/setup-node@v4
57+
with:
58+
node-version: 18
59+
cache: 'npm'
60+
cache-dependency-path: package-lock.json
61+
62+
- run: npm ci
2363

24-
test:
25-
name: 'Run UI Tests'
64+
- uses: ruby/setup-ruby@v1
65+
with:
66+
ruby-version: '3.3.0'
67+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
68+
69+
- working-directory: ios
70+
run: bundle exec pod install
71+
72+
- name: Run xcodebuild
73+
working-directory: ios
74+
run: |
75+
mkdir -p "DerivedData"
76+
derivedData="$(cd "DerivedData" ; pwd -P)"
77+
set -o pipefail && xcodebuild \
78+
-workspace sentry_react_native.xcworkspace \
79+
-configuration "Release" \
80+
-scheme sentry_react_native \
81+
-destination 'generic/platform=iOS Simulator' \
82+
-derivedDataPath "$derivedData" \
83+
build \
84+
| tee xcodebuild.log \
85+
| xcbeautify --quieter --is-ci --disable-colored-output
86+
87+
- name: Upload APP
88+
uses: actions/upload-artifact@v4
89+
with:
90+
name: empower-plant-react-native-ios
91+
path: ios/DerivedData/Build/Products/Release-iphonesimulator/sentry_react_native.app
92+
retention-days: 60
93+
94+
- name: Upload logs
95+
if: ${{ always() }}
96+
uses: actions/upload-artifact@v4
97+
with:
98+
name: build-ios-logs
99+
path: ios/xcodebuild.log
100+
101+
run-ui-test-android:
102+
name: UI Test Android
26103
needs: build-android
27-
uses: ./.github/workflows/test.yml
104+
runs-on: ubuntu-latest
105+
steps:
106+
- uses: actions/checkout@v4
107+
108+
- name: Setup KVM
109+
shell: bash
110+
run: |
111+
# check if virtualization is supported...
112+
sudo apt install -y --no-install-recommends cpu-checker coreutils && echo "CPUs=$(nproc --all)" && kvm-ok
113+
# allow access to KVM to run the emulator
114+
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' \
115+
| sudo tee /etc/udev/rules.d/99-kvm4all.rules
116+
sudo udevadm control --reload-rules
117+
sudo udevadm trigger --name-match=kvm
118+
119+
- name: Download APK artifact
120+
uses: actions/download-artifact@v4
121+
with:
122+
name: empower-plant-react-native-android
123+
124+
- name: Install Maestro
125+
uses: dniHze/maestro-test-action@bda8a93211c86d0a05b7a4597c5ad134566fbde4 # [email protected]
126+
with:
127+
maestro-version: ${{env.MAESTRO_VERSION}}
128+
129+
- name: Run tests
130+
uses: reactivecircus/android-emulator-runner@62dbb605bba737720e10b196cb4220d374026a6d # [email protected]
131+
with:
132+
api-level: 30
133+
force-avd-creation: false
134+
disable-animations: true
135+
disable-spellchecker: true
136+
target: 'aosp_atd'
137+
channel: canary # Necessary for ATDs
138+
emulator-options: >
139+
-no-window
140+
-no-snapshot-save
141+
-gpu swiftshader_indirect
142+
-noaudio
143+
-no-boot-anim
144+
-camera-back none
145+
-camera-front none
146+
-timezone US/Pacific
147+
script: |
148+
adb install -r -d app-release.apk
149+
maestro test maestro --debug-output maestro-logs --env=APP_ID=com.sentry_react_native

.github/workflows/release.yml

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

0 commit comments

Comments
 (0)