From fe667c5e8de102e662e0efb66473cb964591736c Mon Sep 17 00:00:00 2001 From: Nicolas CHAIX Date: Mon, 12 Aug 2024 16:39:05 +0200 Subject: [PATCH] update workflows --- .github/workflows/release.yml | 16 ++++++++++------ .github/workflows/test.yml | 24 ++++++++++++++++-------- 2 files changed, 26 insertions(+), 14 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0e9d48dc..ba3f49c3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 @@ -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: @@ -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: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c6951a1c..e5b6bf26 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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: @@ -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 @@ -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 @@ -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