Skip to content

Commit

Permalink
update workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-chaix-didomi committed Aug 12, 2024
1 parent 3c35a28 commit fe667c5
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 14 deletions.
16 changes: 10 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ jobs:

- name: Build Android App
run: |
npx react-native bundle --platform android --dev false --entry-file index.tsx --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res/
npx react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res/
cd android && ./gradlew assembleDebug --no-daemon
- name: Upload Android App APK
Expand Down Expand Up @@ -134,6 +134,12 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'

- name: Setup Node
uses: actions/setup-node@v4
with:
Expand All @@ -156,14 +162,12 @@ jobs:

- name: Run iOS Tests
run: |
cp index.tsx index.js
npx react-native bundle --entry-file index.js --platform ios --dev false --bundle-output ios/main.jsbundle --assets-dest ios/assets
rm index.js
cd ios && TEST=1 && RCT_NO_LAUNCH_PACKAGER=1 xcodebuild \
-workspace DidomiExample.xcworkspace \
-scheme DidomiExample \
-workspace "Didomi Tests.xcworkspace" \
-scheme Didomi \
-sdk iphonesimulator \
-destination "platform=iOS Simulator,name=iPhone 11" \
-destination "platform=iOS Simulator,name=iPhone 14" \
clean test
release:
Expand Down
24 changes: 16 additions & 8 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'

- name: Setup Node
uses: actions/setup-node@v4
with:
Expand Down Expand Up @@ -87,7 +93,7 @@ jobs:

- name: Build Android App
run: |
npx react-native bundle --platform android --dev false --entry-file index.tsx --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res/
npx react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res/
cd android && ./gradlew assembleDebug --no-daemon
- name: Upload Android App APK
Expand Down Expand Up @@ -119,12 +125,14 @@ jobs:

- name: Run Instrumentation Tests in Firebase Test Lab
run: |
gcloud firebase test android run --type instrumentation \
--app android/app/build/outputs/apk/debug/app-debug.apk \
--test android/app/build/outputs/apk/androidTest/debug/app-debug-androidTest.apk \
gcloud firebase test android run \
--type=instrumentation \
--app=android/app/build/outputs/apk/debug/app-debug.apk \
--test=android/app/build/outputs/apk/androidTest/debug/app-debug-androidTest.apk \
--use-orchestrator \
--device model=MediumPhone.arm,version=33,locale=en,orientation=portrait \
--num-flaky-test-attempts=3
--device="model=MediumPhone.arm,version=34,locale=en,orientation=portrait" \
--num-flaky-test-attempts=3 \
--quiet
ios:
needs: js
Expand Down Expand Up @@ -164,8 +172,8 @@ jobs:
run: |
npx react-native bundle --entry-file index.js --platform ios --dev false --bundle-output ios/main.jsbundle --assets-dest ios/assets
cd ios && TEST=1 && RCT_NO_LAUNCH_PACKAGER=1 xcodebuild \
-workspace DidomiExample.xcworkspace \
-scheme DidomiExample \
-workspace "Didomi Tests.xcworkspace" \
-scheme Didomi \
-sdk iphonesimulator \
-destination "platform=iOS Simulator,name=iPhone 14" \
clean test

0 comments on commit fe667c5

Please sign in to comment.