From 2abe7491772bb9fa506b287b1f00208bc8fc283d Mon Sep 17 00:00:00 2001 From: Nuri Mertcan Guner Date: Thu, 28 Sep 2023 18:13:45 +0200 Subject: [PATCH 01/11] add improved github action ci --- .github/actions/setup/action.yml | 29 ++++ .github/workflows/ci.yml | 156 +++++++++++++++++++++ TestApp/package.json | 2 +- TestApp/src/payments/PaymentsContainer.tsx | 4 +- package.json | 5 +- turbo.json | 18 +-- 6 files changed, 200 insertions(+), 14 deletions(-) create mode 100644 .github/actions/setup/action.yml create mode 100644 .github/workflows/ci.yml diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml new file mode 100644 index 00000000..435974ba --- /dev/null +++ b/.github/actions/setup/action.yml @@ -0,0 +1,29 @@ +name: Setup +description: Setup Node.js and install dependencies + +runs: + using: composite + steps: + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: '18.17.1' + cache: 'yarn' + + - name: Cache dependencies + id: yarn-cache + uses: actions/cache@v3 + with: + path: | + **/node_modules + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}-${{ hashFiles('**/package.json') }} + restore-keys: | + ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} + ${{ runner.os }}-yarn- + + - name: Install dependencies + if: steps.yarn-cache.outputs.cache-hit != 'true' + run: | + yarn install --cwd TestApp --frozen-lockfile + yarn install --frozen-lockfile + shell: bash diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..8f67792e --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,156 @@ +name: CI +on: + push: + branches: + - '**' + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Setup + uses: ./.github/actions/setup + + - name: Lint files + run: | + yarn lint + yarn TestApp lint + + - name: Typecheck files + run: yarn typecheck + + test: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Setup + uses: ./.github/actions/setup + + - name: Run unit tests + run: yarn test --maxWorkers=2 --coverage + + build-library: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Setup + uses: ./.github/actions/setup + + - name: Build package + run: yarn prepack + + build-android: + runs-on: ubuntu-latest + env: + TURBO_CACHE_DIR: .turbo/android + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Setup + uses: ./.github/actions/setup + + - name: Cache turborepo for Android + uses: actions/cache@v3 + with: + path: ${{ env.TURBO_CACHE_DIR }} + key: ${{ runner.os }}-turborepo-android-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-turborepo-android- + + - name: Check turborepo cache for Android + run: | + TURBO_CACHE_STATUS=$(node -p "($(yarn --silent turbo run build:android --cache-dir="${{ env.TURBO_CACHE_DIR }}" --dry=json)).tasks.find(t => t.task === 'build:android').cache.status") + + if [[ $TURBO_CACHE_STATUS == "HIT" ]]; then + echo "turbo_cache_hit=1" >> $GITHUB_ENV + fi + + # setup JDK environment + - name: Set up our JDK environment + uses: actions/setup-java@v3 + with: + distribution: temurin + java-version: 11 + + - name: Finalize Android SDK + if: env.turbo_cache_hit != 1 + run: | + /bin/bash -c "yes | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --licenses > /dev/null" + + - name: Cache Gradle + if: env.turbo_cache_hit != 1 + uses: actions/cache@v3 + with: + path: | + ~/.gradle/wrapper + ~/.gradle/caches + key: ${{ runner.os }}-gradle-${{ hashFiles('TestApp/android/gradle/wrapper/gradle-wrapper.properties') }} + restore-keys: | + ${{ runner.os }}-gradle- + + - name: Bundle JS for Android + run: mkdir TestApp/android/app/src/main/assets && yarn TestApp bundle:android + + - name: Build TestApp for Android + run: | + yarn TestApp turbo run build:android --cache-dir="${{ env.TURBO_CACHE_DIR }}" + + build-ios: + runs-on: macos-latest + env: + TURBO_CACHE_DIR: .turbo/ios + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Setup + uses: ./.github/actions/setup + + - name: Cache turborepo for iOS + uses: actions/cache@v3 + with: + path: ${{ env.TURBO_CACHE_DIR }} + key: ${{ runner.os }}-turborepo-ios-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-turborepo-ios- + + - name: Check turborepo cache for iOS + run: | + TURBO_CACHE_STATUS=$(node -p "($(yarn --silent turbo run build:ios --cache-dir="${{ env.TURBO_CACHE_DIR }}" --dry=json)).tasks.find(t => t.task === 'build:ios').cache.status") + + if [[ $TURBO_CACHE_STATUS == "HIT" ]]; then + echo "turbo_cache_hit=1" >> $GITHUB_ENV + fi + + - name: Cache cocoapods + if: env.turbo_cache_hit != 1 + id: cocoapods-cache + uses: actions/cache@v3 + with: + path: | + **/ios/Pods + key: ${{ runner.os }}-cocoapods-${{ hashFiles('TestApp/ios/Podfile.lock') }} + restore-keys: | + ${{ runner.os }}-cocoapods- + + - name: Install cocoapods + if: env.turbo_cache_hit != 1 && steps.cocoapods-cache.outputs.cache-hit != 'true' + run: | + yarn TestApp pods + env: + NO_FLIPPER: 1 + + - name: Bundle JS for iOS + run: yarn TestApp bundle:ios + + - name: Build TestApp for iOS + run: | + yarn TestApp run build:ios --cache-dir="${{ env.TURBO_CACHE_DIR }}" diff --git a/TestApp/package.json b/TestApp/package.json index f3f5f096..ddbf289b 100644 --- a/TestApp/package.json +++ b/TestApp/package.json @@ -7,7 +7,7 @@ "ios": "react-native run-ios", "start": "react-native start", "test": "jest", - "lint": "eslint .", + "lint": "eslint \"src/**/*.{js,ts,tsx}\"", "format": "prettier --write \"src/**/*.{js,jsx,ts,tsx,json,css,scss,md}\"", "bundle:android": "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", "bundle:android-dev": "react-native bundle --platform android --dev true --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res", diff --git a/TestApp/src/payments/PaymentsContainer.tsx b/TestApp/src/payments/PaymentsContainer.tsx index 3ddd73b0..e75739f2 100644 --- a/TestApp/src/payments/PaymentsContainer.tsx +++ b/TestApp/src/payments/PaymentsContainer.tsx @@ -107,9 +107,7 @@ export default function PaymentsContainer(props: PaymentsContainerProps) { /> {actionButtons()} - + {eventState} diff --git a/package.json b/package.json index 7329711b..4a0d80c3 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,10 @@ "lint": "eslint \"src/**/*.{js,ts,tsx}\"", "lint:fix": "eslint \"src/**/*.{js,ts,tsx}\" --fix", "format": "prettier --write \"src/**/*.{js,jsx,ts,tsx,json,css,scss,md}\"", - "clean": "del-cli android/build ios/build TestApp/android/build TestApp/android/app/build TestApp/ios/build" + "clean": "del-cli android/build ios/build TestApp/android/build TestApp/android/app/build TestApp/ios/build", + "build:android": "cd TestApp/android && ./gradlew assembleDebug --no-daemon --console=plain -PreactNativeArchitectures=arm64-v8a", + "build:ios": "cd TestApp/ios && xcodebuild -workspace TestApp.xcworkspace -scheme TestApp -configuration Debug -sdk iphonesimulator CC=clang CPLUSPLUS=clang++ LD=clang LDPLUSPLUS=clang++ GCC_OPTIMIZATION_LEVEL=0 GCC_PRECOMPILE_PREFIX_HEADER=YES ASSETCATALOG_COMPILER_OPTIMIZATION=time DEBUG_INFORMATION_FORMAT=dwarf COMPILER_INDEX_STORE_ENABLE=NO", + "TestApp": "yarn --cwd TestApp" }, "keywords": [ "react-native", diff --git a/turbo.json b/turbo.json index 331e2890..515fdd6a 100644 --- a/turbo.json +++ b/turbo.json @@ -8,11 +8,11 @@ "!android/build", "src/*.ts", "src/*.tsx", - "example/package.json", - "example/android", - "!example/android/.gradle", - "!example/android/build", - "!example/android/app/build" + "TestApp/package.json", + "TestApp/android", + "!TestApp/android/.gradle", + "!TestApp/android/build", + "!TestApp/android/app/build" ], "outputs": [] }, @@ -23,10 +23,10 @@ "ios", "src/*.ts", "src/*.tsx", - "example/package.json", - "example/ios", - "!example/ios/build", - "!example/ios/Pods" + "TestApp/package.json", + "TestApp/ios", + "!TestApp/ios/build", + "!TestApp/ios/Pods" ], "outputs": [] } From b164eeac21c8fd4e7b604e75cc0e91fd4f114ab6 Mon Sep 17 00:00:00 2001 From: Nuri Mertcan Guner Date: Thu, 28 Sep 2023 18:24:08 +0200 Subject: [PATCH 02/11] add todo test --- .gitignore | 10 +++----- package.json | 1 + src/__tests__/index.test.tsx | 1 + yarn.lock | 45 ++++++++++++++++++++++++++++++++++++ 4 files changed, 50 insertions(+), 7 deletions(-) create mode 100644 src/__tests__/index.test.tsx diff --git a/.gitignore b/.gitignore index 7a279405..e05a05ce 100644 --- a/.gitignore +++ b/.gitignore @@ -40,13 +40,6 @@ project.xcworkspace local.properties android.iml -# Cocoapods -# -example/ios/Pods - -# Ruby -example/vendor/ - # node.js # node_modules/ @@ -78,3 +71,6 @@ ios/Podfile.lock # fastlane fastlane/report.xml local-scripts + +# coverage +coverage diff --git a/package.json b/package.json index 4a0d80c3..bbd340c8 100644 --- a/package.json +++ b/package.json @@ -71,6 +71,7 @@ "eslint-plugin-jest": "^27.2.3", "eslint-plugin-prettier": "^5.0.0", "jest": "^29.2.1", + "metro-react-native-babel-preset": "0.76.8", "pod-install": "^0.1.0", "prettier": "^3.0.3", "react": "18.2.0", diff --git a/src/__tests__/index.test.tsx b/src/__tests__/index.test.tsx new file mode 100644 index 00000000..82857d3c --- /dev/null +++ b/src/__tests__/index.test.tsx @@ -0,0 +1 @@ +it.todo('Write tests.'); diff --git a/yarn.lock b/yarn.lock index 7c268b43..86ca3e77 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5273,6 +5273,51 @@ metro-react-native-babel-preset@0.76.7: babel-plugin-transform-flow-enums "^0.0.2" react-refresh "^0.4.0" +metro-react-native-babel-preset@0.76.8: + version "0.76.8" + resolved "https://registry.yarnpkg.com/metro-react-native-babel-preset/-/metro-react-native-babel-preset-0.76.8.tgz#7476efae14363cbdfeeec403b4f01d7348e6c048" + integrity sha512-Ptza08GgqzxEdK8apYsjTx2S8WDUlS2ilBlu9DR1CUcHmg4g3kOkFylZroogVAUKtpYQNYwAvdsjmrSdDNtiAg== + dependencies: + "@babel/core" "^7.20.0" + "@babel/plugin-proposal-async-generator-functions" "^7.0.0" + "@babel/plugin-proposal-class-properties" "^7.18.0" + "@babel/plugin-proposal-export-default-from" "^7.0.0" + "@babel/plugin-proposal-nullish-coalescing-operator" "^7.18.0" + "@babel/plugin-proposal-numeric-separator" "^7.0.0" + "@babel/plugin-proposal-object-rest-spread" "^7.20.0" + "@babel/plugin-proposal-optional-catch-binding" "^7.0.0" + "@babel/plugin-proposal-optional-chaining" "^7.20.0" + "@babel/plugin-syntax-dynamic-import" "^7.8.0" + "@babel/plugin-syntax-export-default-from" "^7.0.0" + "@babel/plugin-syntax-flow" "^7.18.0" + "@babel/plugin-syntax-nullish-coalescing-operator" "^7.0.0" + "@babel/plugin-syntax-optional-chaining" "^7.0.0" + "@babel/plugin-transform-arrow-functions" "^7.0.0" + "@babel/plugin-transform-async-to-generator" "^7.20.0" + "@babel/plugin-transform-block-scoping" "^7.0.0" + "@babel/plugin-transform-classes" "^7.0.0" + "@babel/plugin-transform-computed-properties" "^7.0.0" + "@babel/plugin-transform-destructuring" "^7.20.0" + "@babel/plugin-transform-flow-strip-types" "^7.20.0" + "@babel/plugin-transform-function-name" "^7.0.0" + "@babel/plugin-transform-literals" "^7.0.0" + "@babel/plugin-transform-modules-commonjs" "^7.0.0" + "@babel/plugin-transform-named-capturing-groups-regex" "^7.0.0" + "@babel/plugin-transform-parameters" "^7.0.0" + "@babel/plugin-transform-react-display-name" "^7.0.0" + "@babel/plugin-transform-react-jsx" "^7.0.0" + "@babel/plugin-transform-react-jsx-self" "^7.0.0" + "@babel/plugin-transform-react-jsx-source" "^7.0.0" + "@babel/plugin-transform-runtime" "^7.0.0" + "@babel/plugin-transform-shorthand-properties" "^7.0.0" + "@babel/plugin-transform-spread" "^7.0.0" + "@babel/plugin-transform-sticky-regex" "^7.0.0" + "@babel/plugin-transform-typescript" "^7.5.0" + "@babel/plugin-transform-unicode-regex" "^7.0.0" + "@babel/template" "^7.0.0" + babel-plugin-transform-flow-enums "^0.0.2" + react-refresh "^0.4.0" + metro-react-native-babel-transformer@0.76.7: version "0.76.7" resolved "https://registry.yarnpkg.com/metro-react-native-babel-transformer/-/metro-react-native-babel-transformer-0.76.7.tgz#ccc7c25b49ee8a1860aafdbf48bfa5441d206f8f" From e2806bfb7d6ca722bd36a31b228b18737bf12d33 Mon Sep 17 00:00:00 2001 From: Nuri Mertcan Guner Date: Thu, 28 Sep 2023 18:25:29 +0200 Subject: [PATCH 03/11] fix build scripts --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8f67792e..362fb308 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -101,7 +101,7 @@ jobs: - name: Build TestApp for Android run: | - yarn TestApp turbo run build:android --cache-dir="${{ env.TURBO_CACHE_DIR }}" + yarn turbo run build:android --cache-dir="${{ env.TURBO_CACHE_DIR }}" build-ios: runs-on: macos-latest @@ -153,4 +153,4 @@ jobs: - name: Build TestApp for iOS run: | - yarn TestApp run build:ios --cache-dir="${{ env.TURBO_CACHE_DIR }}" + yarn run build:ios --cache-dir="${{ env.TURBO_CACHE_DIR }}" From ff19b4a72057b9f9aff9dde124317e114bef4396 Mon Sep 17 00:00:00 2001 From: Nuri Mertcan Guner Date: Thu, 28 Sep 2023 19:04:04 +0200 Subject: [PATCH 04/11] cleanup workflows --- .github/workflows/android_build.yml | 62 ---------------- ...ration_tests.yml => integration_tests.yml} | 71 ++++++++++--------- 2 files changed, 37 insertions(+), 96 deletions(-) delete mode 100644 .github/workflows/android_build.yml rename .github/workflows/{android_integration_tests.yml => integration_tests.yml} (55%) diff --git a/.github/workflows/android_build.yml b/.github/workflows/android_build.yml deleted file mode 100644 index bd6be040..00000000 --- a/.github/workflows/android_build.yml +++ /dev/null @@ -1,62 +0,0 @@ -name: Android Test & Build - -on: push - -jobs: - android-build: - name: Android Test & Build - runs-on: ubuntu-latest - - steps: - # clone the repo to workspace - - name: Check out Git repository - uses: actions/checkout@v2 - - # setup JDK environment - - name: Set up our JDK environment - uses: actions/setup-java@v3 - with: - distribution: temurin - java-version: 11 - - # setup node environment - - name: Install NodeJS - uses: actions/setup-node@v3 - with: - node-version: '18.17.1' - cache: 'yarn' - - # install project dependencies - - name: Install dependencies for lib - run: yarn install --frozen-lockfile - - - name: Install dependencies for TestApp - run: cd TestApp && yarn install --frozen-lockfile && cd .. - - ## configure cache for gradle - - name: Cache Gradle Wrapper - uses: actions/cache@v2 - with: - path: ~/.gradle/wrapper - key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }} - - - name: Cache Gradle Dependencies - uses: actions/cache@v2 - with: - path: ~/.gradle/caches - key: ${{ runner.os }}-gradle-caches-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }} - restore-keys: | - ${{ runner.os }}-gradle-caches- - - ## make gradlew executable in ci - - name: Make Gradlew Executable - run: cd android && chmod +x ./gradlew - - - name: Run Android unit tests - run: cd TestApp/android && ./gradlew clean && ./gradlew testDebugUnitTest && cd ../.. - - - name: Bundle JS for Android - run: cd TestApp && mkdir android/app/src/main/assets && yarn bundle:android-dev && cd .. - - - name: Build Android Test App - run: cd TestApp/android && ./gradlew clean && ./gradlew app:assembleDebug && cd ../.. diff --git a/.github/workflows/android_integration_tests.yml b/.github/workflows/integration_tests.yml similarity index 55% rename from .github/workflows/android_integration_tests.yml rename to .github/workflows/integration_tests.yml index 09b9f911..8a6b028f 100644 --- a/.github/workflows/android_integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -1,4 +1,4 @@ -name: Android Integration Tests +name: Integration Tests on: pull_request: @@ -6,7 +6,7 @@ on: - master jobs: - android-build: + test-android: name: Android Integration Tests runs-on: ubuntu-latest @@ -20,6 +20,25 @@ jobs: - name: Check out Git repository uses: actions/checkout@v2 + - name: Setup + uses: ./.github/actions/setup + + - name: Cache turborepo for Android + uses: actions/cache@v3 + with: + path: ${{ env.TURBO_CACHE_DIR }} + key: ${{ runner.os }}-turborepo-android-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-turborepo-android- + + - name: Check turborepo cache for Android + run: | + TURBO_CACHE_STATUS=$(node -p "($(yarn --silent turbo run build:android --cache-dir="${{ env.TURBO_CACHE_DIR }}" --dry=json)).tasks.find(t => t.task === 'build:android').cache.status") + + if [[ $TURBO_CACHE_STATUS == "HIT" ]]; then + echo "turbo_cache_hit=1" >> $GITHUB_ENV + fi + # setup JDK environment - name: Set up our JDK environment uses: actions/setup-java@v3 @@ -27,44 +46,28 @@ jobs: distribution: temurin java-version: 11 - # setup node environment - - name: Install NodeJS - uses: actions/setup-node@v3 - with: - node-version: '18.17.1' - cache: 'yarn' - - # install project dependencies - - name: Install dependencies for lib - run: yarn install --frozen-lockfile - - - name: Install dependencies for TestApp - run: cd TestApp && yarn install --frozen-lockfile && cd .. - - ## configure cache for gradle - - name: Cache Gradle Wrapper - uses: actions/cache@v2 - with: - path: ~/.gradle/wrapper - key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }} + - name: Finalize Android SDK + if: env.turbo_cache_hit != 1 + run: | + /bin/bash -c "yes | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --licenses > /dev/null" - - name: Cache Gradle Dependencies - uses: actions/cache@v2 + - name: Cache Gradle + if: env.turbo_cache_hit != 1 + uses: actions/cache@v3 with: - path: ~/.gradle/caches - key: ${{ runner.os }}-gradle-caches-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }} + path: | + ~/.gradle/wrapper + ~/.gradle/caches + key: ${{ runner.os }}-gradle-${{ hashFiles('TestApp/android/gradle/wrapper/gradle-wrapper.properties') }} restore-keys: | - ${{ runner.os }}-gradle-caches- - - ## make gradlew executable in ci - - name: Make Gradlew Executable - run: cd android && chmod +x ./gradlew + ${{ runner.os }}-gradle- - name: Bundle JS for Android - run: cd TestApp && mkdir android/app/src/main/assets && yarn bundle:android-dev && cd .. + run: mkdir TestApp/android/app/src/main/assets && yarn TestApp bundle:android - - name: Build Android Test App - run: cd TestApp/android && ./gradlew clean && ./gradlew app:assembleDebug + - name: Build TestApp for Android + run: | + yarn turbo run build:android --cache-dir="${{ env.TURBO_CACHE_DIR }}" ## make gradlew executable in ci - name: Make Gradlew Executable From 9fc8343870cb79b9d1bc1f36c7ab7142140b89dd Mon Sep 17 00:00:00 2001 From: Nuri Mertcan Guner Date: Thu, 28 Sep 2023 19:28:57 +0200 Subject: [PATCH 05/11] add turbo to ios build --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 362fb308..f9cc9538 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -153,4 +153,4 @@ jobs: - name: Build TestApp for iOS run: | - yarn run build:ios --cache-dir="${{ env.TURBO_CACHE_DIR }}" + yarn turbo run build:ios --cache-dir="${{ env.TURBO_CACHE_DIR }}" From 8f728faf0593e56aa63e205573106033bb9af2fe Mon Sep 17 00:00:00 2001 From: Nuri Mertcan Guner Date: Fri, 29 Sep 2023 09:42:07 +0200 Subject: [PATCH 06/11] add pod install when cached --- .github/workflows/ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f9cc9538..e4b97a39 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -142,7 +142,6 @@ jobs: ${{ runner.os }}-cocoapods- - name: Install cocoapods - if: env.turbo_cache_hit != 1 && steps.cocoapods-cache.outputs.cache-hit != 'true' run: | yarn TestApp pods env: From 220761621dcce53f620efc88cb171adf916af16c Mon Sep 17 00:00:00 2001 From: Nuri Mertcan Guner Date: Fri, 29 Sep 2023 09:58:30 +0200 Subject: [PATCH 07/11] separate workflow for testapp --- .github/workflows/ci.yml | 108 ----------------------------- .github/workflows/test_apps.yml | 118 ++++++++++++++++++++++++++++++++ 2 files changed, 118 insertions(+), 108 deletions(-) create mode 100644 .github/workflows/test_apps.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e4b97a39..41d22b30 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -45,111 +45,3 @@ jobs: - name: Build package run: yarn prepack - - build-android: - runs-on: ubuntu-latest - env: - TURBO_CACHE_DIR: .turbo/android - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Setup - uses: ./.github/actions/setup - - - name: Cache turborepo for Android - uses: actions/cache@v3 - with: - path: ${{ env.TURBO_CACHE_DIR }} - key: ${{ runner.os }}-turborepo-android-${{ hashFiles('**/yarn.lock') }} - restore-keys: | - ${{ runner.os }}-turborepo-android- - - - name: Check turborepo cache for Android - run: | - TURBO_CACHE_STATUS=$(node -p "($(yarn --silent turbo run build:android --cache-dir="${{ env.TURBO_CACHE_DIR }}" --dry=json)).tasks.find(t => t.task === 'build:android').cache.status") - - if [[ $TURBO_CACHE_STATUS == "HIT" ]]; then - echo "turbo_cache_hit=1" >> $GITHUB_ENV - fi - - # setup JDK environment - - name: Set up our JDK environment - uses: actions/setup-java@v3 - with: - distribution: temurin - java-version: 11 - - - name: Finalize Android SDK - if: env.turbo_cache_hit != 1 - run: | - /bin/bash -c "yes | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --licenses > /dev/null" - - - name: Cache Gradle - if: env.turbo_cache_hit != 1 - uses: actions/cache@v3 - with: - path: | - ~/.gradle/wrapper - ~/.gradle/caches - key: ${{ runner.os }}-gradle-${{ hashFiles('TestApp/android/gradle/wrapper/gradle-wrapper.properties') }} - restore-keys: | - ${{ runner.os }}-gradle- - - - name: Bundle JS for Android - run: mkdir TestApp/android/app/src/main/assets && yarn TestApp bundle:android - - - name: Build TestApp for Android - run: | - yarn turbo run build:android --cache-dir="${{ env.TURBO_CACHE_DIR }}" - - build-ios: - runs-on: macos-latest - env: - TURBO_CACHE_DIR: .turbo/ios - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Setup - uses: ./.github/actions/setup - - - name: Cache turborepo for iOS - uses: actions/cache@v3 - with: - path: ${{ env.TURBO_CACHE_DIR }} - key: ${{ runner.os }}-turborepo-ios-${{ hashFiles('**/yarn.lock') }} - restore-keys: | - ${{ runner.os }}-turborepo-ios- - - - name: Check turborepo cache for iOS - run: | - TURBO_CACHE_STATUS=$(node -p "($(yarn --silent turbo run build:ios --cache-dir="${{ env.TURBO_CACHE_DIR }}" --dry=json)).tasks.find(t => t.task === 'build:ios').cache.status") - - if [[ $TURBO_CACHE_STATUS == "HIT" ]]; then - echo "turbo_cache_hit=1" >> $GITHUB_ENV - fi - - - name: Cache cocoapods - if: env.turbo_cache_hit != 1 - id: cocoapods-cache - uses: actions/cache@v3 - with: - path: | - **/ios/Pods - key: ${{ runner.os }}-cocoapods-${{ hashFiles('TestApp/ios/Podfile.lock') }} - restore-keys: | - ${{ runner.os }}-cocoapods- - - - name: Install cocoapods - run: | - yarn TestApp pods - env: - NO_FLIPPER: 1 - - - name: Bundle JS for iOS - run: yarn TestApp bundle:ios - - - name: Build TestApp for iOS - run: | - yarn turbo run build:ios --cache-dir="${{ env.TURBO_CACHE_DIR }}" diff --git a/.github/workflows/test_apps.yml b/.github/workflows/test_apps.yml new file mode 100644 index 00000000..52e1736c --- /dev/null +++ b/.github/workflows/test_apps.yml @@ -0,0 +1,118 @@ +name: Test Apps + +on: + push: + branches: + - master + pull_request: + branches: + - master + +jobs: + build-android: + runs-on: ubuntu-latest + env: + TURBO_CACHE_DIR: .turbo/android + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Setup + uses: ./.github/actions/setup + + - name: Cache turborepo for Android + uses: actions/cache@v3 + with: + path: ${{ env.TURBO_CACHE_DIR }} + key: ${{ runner.os }}-turborepo-android-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-turborepo-android- + + - name: Check turborepo cache for Android + run: | + TURBO_CACHE_STATUS=$(node -p "($(yarn --silent turbo run build:android --cache-dir="${{ env.TURBO_CACHE_DIR }}" --dry=json)).tasks.find(t => t.task === 'build:android').cache.status") + + if [[ $TURBO_CACHE_STATUS == "HIT" ]]; then + echo "turbo_cache_hit=1" >> $GITHUB_ENV + fi + + # setup JDK environment + - name: Set up our JDK environment + uses: actions/setup-java@v3 + with: + distribution: temurin + java-version: 11 + + - name: Finalize Android SDK + if: env.turbo_cache_hit != 1 + run: | + /bin/bash -c "yes | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --licenses > /dev/null" + + - name: Cache Gradle + if: env.turbo_cache_hit != 1 + uses: actions/cache@v3 + with: + path: | + ~/.gradle/wrapper + ~/.gradle/caches + key: ${{ runner.os }}-gradle-${{ hashFiles('TestApp/android/gradle/wrapper/gradle-wrapper.properties') }} + restore-keys: | + ${{ runner.os }}-gradle- + + - name: Bundle JS for Android + run: mkdir TestApp/android/app/src/main/assets && yarn TestApp bundle:android + + - name: Build TestApp for Android + run: | + yarn turbo run build:android --cache-dir="${{ env.TURBO_CACHE_DIR }}" + + build-ios: + runs-on: macos-latest + env: + TURBO_CACHE_DIR: .turbo/ios + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Setup + uses: ./.github/actions/setup + + - name: Cache turborepo for iOS + uses: actions/cache@v3 + with: + path: ${{ env.TURBO_CACHE_DIR }} + key: ${{ runner.os }}-turborepo-ios-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-turborepo-ios- + + - name: Check turborepo cache for iOS + run: | + TURBO_CACHE_STATUS=$(node -p "($(yarn --silent turbo run build:ios --cache-dir="${{ env.TURBO_CACHE_DIR }}" --dry=json)).tasks.find(t => t.task === 'build:ios').cache.status") + + if [[ $TURBO_CACHE_STATUS == "HIT" ]]; then + echo "turbo_cache_hit=1" >> $GITHUB_ENV + fi + + - name: Cache cocoapods + if: env.turbo_cache_hit != 1 + id: cocoapods-cache + uses: actions/cache@v3 + with: + path: | + **/ios/Pods + key: ${{ runner.os }}-cocoapods-${{ hashFiles('TestApp/ios/Podfile.lock') }} + restore-keys: | + ${{ runner.os }}-cocoapods- + + - name: Install cocoapods + run: | + yarn TestApp pods + env: + NO_FLIPPER: 1 + + - name: Bundle JS for iOS + run: yarn TestApp bundle:ios + + - name: Build TestApp for iOS + run: | + yarn turbo run build:ios --cache-dir="${{ env.TURBO_CACHE_DIR }}" From 97f4f5fde45830a795ccd117f1a7b15eb025518f Mon Sep 17 00:00:00 2001 From: Nuri Mertcan Guner Date: Fri, 29 Sep 2023 11:02:12 +0200 Subject: [PATCH 08/11] add unit tests to workflow --- .../{test_apps.yml => tests_and_apps.yml} | 33 ++++++++++++++++--- ios/Podfile | 2 +- package.json | 3 ++ 3 files changed, 32 insertions(+), 6 deletions(-) rename .github/workflows/{test_apps.yml => tests_and_apps.yml} (81%) diff --git a/.github/workflows/test_apps.yml b/.github/workflows/tests_and_apps.yml similarity index 81% rename from .github/workflows/test_apps.yml rename to .github/workflows/tests_and_apps.yml index 52e1736c..6f1fad7b 100644 --- a/.github/workflows/test_apps.yml +++ b/.github/workflows/tests_and_apps.yml @@ -59,7 +59,10 @@ jobs: restore-keys: | ${{ runner.os }}-gradle- - - name: Bundle JS for Android + - name: Run Unit Tests for Android + run: yarn test:android + + - name: Bundle TestApp JS for Android run: mkdir TestApp/android/app/src/main/assets && yarn TestApp bundle:android - name: Build TestApp for Android @@ -93,24 +96,44 @@ jobs: echo "turbo_cache_hit=1" >> $GITHUB_ENV fi - - name: Cache cocoapods + - name: Cache Lib cocoapods + if: env.turbo_cache_hit != 1 + id: cocoapods-cache-lib + uses: actions/cache@v3 + with: + path: | + ios/Pods + key: ${{ runner.os }}-cocoapods-${{ hashFiles('ios/Podfile') }} + restore-keys: | + ${{ runner.os }}-cocoapods- + + - name: Install Lib cocoapods + run: | + yarn pods + env: + NO_FLIPPER: 1 + + - name: Run Unit Tests for iOS + run: yarn test:ios + + - name: Cache TestApp cocoapods if: env.turbo_cache_hit != 1 id: cocoapods-cache uses: actions/cache@v3 with: path: | - **/ios/Pods + TestApp/**/ios/Pods key: ${{ runner.os }}-cocoapods-${{ hashFiles('TestApp/ios/Podfile.lock') }} restore-keys: | ${{ runner.os }}-cocoapods- - - name: Install cocoapods + - name: Install TestApp cocoapods run: | yarn TestApp pods env: NO_FLIPPER: 1 - - name: Bundle JS for iOS + - name: Bundle TestApp JS for iOS run: yarn TestApp bundle:ios - name: Build TestApp for iOS diff --git a/ios/Podfile b/ios/Podfile index bd80c646..7dd0bf45 100644 --- a/ios/Podfile +++ b/ios/Podfile @@ -1,5 +1,5 @@ # Uncomment the next line to define a global platform for your project -# platform :ios, '13.0' +platform :ios, '16.0' require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules' require_relative '../node_modules/react-native/scripts/react_native_pods' diff --git a/package.json b/package.json index bbd340c8..dd55d4d2 100644 --- a/package.json +++ b/package.json @@ -34,6 +34,9 @@ "lint:fix": "eslint \"src/**/*.{js,ts,tsx}\" --fix", "format": "prettier --write \"src/**/*.{js,jsx,ts,tsx,json,css,scss,md}\"", "clean": "del-cli android/build ios/build TestApp/android/build TestApp/android/app/build TestApp/ios/build", + "pods": "pod-install --quiet", + "test:android": "cd TestApp/android && ./gradlew :react-native-klarna-inapp-sdk:testDebugUnitTest && cd ../..", + "test:ios": "cd ios && xcodebuild -workspace RNKlarnaMobileSDK.xcworkspace -scheme RNKlarnaMobileSDK -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 14' test", "build:android": "cd TestApp/android && ./gradlew assembleDebug --no-daemon --console=plain -PreactNativeArchitectures=arm64-v8a", "build:ios": "cd TestApp/ios && xcodebuild -workspace TestApp.xcworkspace -scheme TestApp -configuration Debug -sdk iphonesimulator CC=clang CPLUSPLUS=clang++ LD=clang LDPLUSPLUS=clang++ GCC_OPTIMIZATION_LEVEL=0 GCC_PRECOMPILE_PREFIX_HEADER=YES ASSETCATALOG_COMPILER_OPTIMIZATION=time DEBUG_INFORMATION_FORMAT=dwarf COMPILER_INDEX_STORE_ENABLE=NO", "TestApp": "yarn --cwd TestApp" From 425c0a5b7f325b2c3aa43d515454def1578656ac Mon Sep 17 00:00:00 2001 From: Nuri Mertcan Guner Date: Fri, 29 Sep 2023 11:03:50 +0200 Subject: [PATCH 09/11] add file ignore --- package.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/package.json b/package.json index dd55d4d2..ef6861a0 100644 --- a/package.json +++ b/package.json @@ -16,6 +16,9 @@ "cpp", "*.podspec", "!ios/build", + "!ios/Podfile", + "!ios/Pods", + "!ios/RNKlarnaMobileSDK.xcworkspace", "!android/build", "!android/gradle", "!android/gradlew", From 3173a4883760391549311b4d06300cdef2d2f10f Mon Sep 17 00:00:00 2001 From: Nuri Mertcan Guner Date: Fri, 6 Oct 2023 10:19:31 +0200 Subject: [PATCH 10/11] rename workflows --- .github/workflows/{ci.yml => library.yml} | 2 +- .../workflows/{tests_and_apps.yml => native_tests_and_apps.yml} | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename .github/workflows/{ci.yml => library.yml} (98%) rename .github/workflows/{tests_and_apps.yml => native_tests_and_apps.yml} (99%) diff --git a/.github/workflows/ci.yml b/.github/workflows/library.yml similarity index 98% rename from .github/workflows/ci.yml rename to .github/workflows/library.yml index 41d22b30..40a24658 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/library.yml @@ -1,4 +1,4 @@ -name: CI +name: Library on: push: branches: diff --git a/.github/workflows/tests_and_apps.yml b/.github/workflows/native_tests_and_apps.yml similarity index 99% rename from .github/workflows/tests_and_apps.yml rename to .github/workflows/native_tests_and_apps.yml index 6f1fad7b..d0078324 100644 --- a/.github/workflows/tests_and_apps.yml +++ b/.github/workflows/native_tests_and_apps.yml @@ -1,4 +1,4 @@ -name: Test Apps +name: Native Tests & Apps on: push: From 0affdddde594540f983763216982539fba2ff046 Mon Sep 17 00:00:00 2001 From: Nuri Mertcan Guner Date: Fri, 6 Oct 2023 11:53:36 +0200 Subject: [PATCH 11/11] remove fastlane --- Gemfile | 8 -- Gemfile.lock | 288 --------------------------------------------- fastlane/Fastfile | 69 ----------- fastlane/README.md | 64 ---------- 4 files changed, 429 deletions(-) delete mode 100644 Gemfile delete mode 100644 Gemfile.lock delete mode 100644 fastlane/Fastfile delete mode 100644 fastlane/README.md diff --git a/Gemfile b/Gemfile deleted file mode 100644 index f99ba64d..00000000 --- a/Gemfile +++ /dev/null @@ -1,8 +0,0 @@ -source 'https://rubygems.org' - -# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version -ruby '>= 2.7.5' - -gem 'cocoapods', '~> 1.12' -gem 'fastlane' -gem 'xcode-install' diff --git a/Gemfile.lock b/Gemfile.lock deleted file mode 100644 index 4490d628..00000000 --- a/Gemfile.lock +++ /dev/null @@ -1,288 +0,0 @@ -GEM - remote: https://rubygems.org/ - specs: - CFPropertyList (3.0.6) - rexml - activesupport (7.0.8) - concurrent-ruby (~> 1.0, >= 1.0.2) - i18n (>= 1.6, < 2) - minitest (>= 5.1) - tzinfo (~> 2.0) - addressable (2.8.5) - public_suffix (>= 2.0.2, < 6.0) - algoliasearch (1.27.5) - httpclient (~> 2.8, >= 2.8.3) - json (>= 1.5.1) - artifactory (3.0.15) - atomos (0.1.3) - aws-eventstream (1.2.0) - aws-partitions (1.824.0) - aws-sdk-core (3.181.1) - aws-eventstream (~> 1, >= 1.0.2) - aws-partitions (~> 1, >= 1.651.0) - aws-sigv4 (~> 1.5) - jmespath (~> 1, >= 1.6.1) - aws-sdk-kms (1.71.0) - aws-sdk-core (~> 3, >= 3.177.0) - aws-sigv4 (~> 1.1) - aws-sdk-s3 (1.134.0) - aws-sdk-core (~> 3, >= 3.181.0) - aws-sdk-kms (~> 1) - aws-sigv4 (~> 1.6) - aws-sigv4 (1.6.0) - aws-eventstream (~> 1, >= 1.0.2) - babosa (1.0.4) - claide (1.1.0) - cocoapods (1.12.1) - addressable (~> 2.8) - claide (>= 1.0.2, < 2.0) - cocoapods-core (= 1.12.1) - cocoapods-deintegrate (>= 1.0.3, < 2.0) - cocoapods-downloader (>= 1.6.0, < 2.0) - cocoapods-plugins (>= 1.0.0, < 2.0) - cocoapods-search (>= 1.0.0, < 2.0) - cocoapods-trunk (>= 1.6.0, < 2.0) - cocoapods-try (>= 1.1.0, < 2.0) - colored2 (~> 3.1) - escape (~> 0.0.4) - fourflusher (>= 2.3.0, < 3.0) - gh_inspector (~> 1.0) - molinillo (~> 0.8.0) - nap (~> 1.0) - ruby-macho (>= 2.3.0, < 3.0) - xcodeproj (>= 1.21.0, < 2.0) - cocoapods-core (1.12.1) - activesupport (>= 5.0, < 8) - addressable (~> 2.8) - algoliasearch (~> 1.0) - concurrent-ruby (~> 1.1) - fuzzy_match (~> 2.0.4) - nap (~> 1.0) - netrc (~> 0.11) - public_suffix (~> 4.0) - typhoeus (~> 1.0) - cocoapods-deintegrate (1.0.5) - cocoapods-downloader (1.6.3) - cocoapods-plugins (1.0.0) - nap - cocoapods-search (1.0.1) - cocoapods-trunk (1.6.0) - nap (>= 0.8, < 2.0) - netrc (~> 0.11) - cocoapods-try (1.2.0) - colored (1.2) - colored2 (3.1.2) - commander (4.6.0) - highline (~> 2.0.0) - concurrent-ruby (1.2.2) - declarative (0.0.20) - digest-crc (0.6.5) - rake (>= 12.0.0, < 14.0.0) - domain_name (0.5.20190701) - unf (>= 0.0.5, < 1.0.0) - dotenv (2.8.1) - emoji_regex (3.2.3) - escape (0.0.4) - ethon (0.16.0) - ffi (>= 1.15.0) - excon (0.103.0) - faraday (1.10.3) - faraday-em_http (~> 1.0) - faraday-em_synchrony (~> 1.0) - faraday-excon (~> 1.1) - faraday-httpclient (~> 1.0) - faraday-multipart (~> 1.0) - faraday-net_http (~> 1.0) - faraday-net_http_persistent (~> 1.0) - faraday-patron (~> 1.0) - faraday-rack (~> 1.0) - faraday-retry (~> 1.0) - ruby2_keywords (>= 0.0.4) - faraday-cookie_jar (0.0.7) - faraday (>= 0.8.0) - http-cookie (~> 1.0.0) - faraday-em_http (1.0.0) - faraday-em_synchrony (1.0.0) - faraday-excon (1.1.0) - faraday-httpclient (1.0.1) - faraday-multipart (1.0.4) - multipart-post (~> 2) - faraday-net_http (1.0.1) - faraday-net_http_persistent (1.2.0) - faraday-patron (1.0.0) - faraday-rack (1.0.0) - faraday-retry (1.0.3) - faraday_middleware (1.2.0) - faraday (~> 1.0) - fastimage (2.2.7) - fastlane (2.215.1) - CFPropertyList (>= 2.3, < 4.0.0) - addressable (>= 2.8, < 3.0.0) - artifactory (~> 3.0) - aws-sdk-s3 (~> 1.0) - babosa (>= 1.0.3, < 2.0.0) - bundler (>= 1.12.0, < 3.0.0) - colored - commander (~> 4.6) - dotenv (>= 2.1.1, < 3.0.0) - emoji_regex (>= 0.1, < 4.0) - excon (>= 0.71.0, < 1.0.0) - faraday (~> 1.0) - faraday-cookie_jar (~> 0.0.6) - faraday_middleware (~> 1.0) - fastimage (>= 2.1.0, < 3.0.0) - gh_inspector (>= 1.1.2, < 2.0.0) - google-apis-androidpublisher_v3 (~> 0.3) - google-apis-playcustomapp_v1 (~> 0.1) - google-cloud-storage (~> 1.31) - highline (~> 2.0) - http-cookie (~> 1.0.5) - json (< 3.0.0) - jwt (>= 2.1.0, < 3) - mini_magick (>= 4.9.4, < 5.0.0) - multipart-post (>= 2.0.0, < 3.0.0) - naturally (~> 2.2) - optparse (~> 0.1.1) - plist (>= 3.1.0, < 4.0.0) - rubyzip (>= 2.0.0, < 3.0.0) - security (= 0.1.3) - simctl (~> 1.6.3) - terminal-notifier (>= 2.0.0, < 3.0.0) - terminal-table (~> 3) - tty-screen (>= 0.6.3, < 1.0.0) - tty-spinner (>= 0.8.0, < 1.0.0) - word_wrap (~> 1.0.0) - xcodeproj (>= 1.13.0, < 2.0.0) - xcpretty (~> 0.3.0) - xcpretty-travis-formatter (>= 0.0.3) - ffi (1.15.5) - fourflusher (2.3.1) - fuzzy_match (2.0.4) - gh_inspector (1.1.3) - google-apis-androidpublisher_v3 (0.49.0) - google-apis-core (>= 0.11.0, < 2.a) - google-apis-core (0.11.1) - addressable (~> 2.5, >= 2.5.1) - googleauth (>= 0.16.2, < 2.a) - httpclient (>= 2.8.1, < 3.a) - mini_mime (~> 1.0) - representable (~> 3.0) - retriable (>= 2.0, < 4.a) - rexml - webrick - google-apis-iamcredentials_v1 (0.17.0) - google-apis-core (>= 0.11.0, < 2.a) - google-apis-playcustomapp_v1 (0.13.0) - google-apis-core (>= 0.11.0, < 2.a) - google-apis-storage_v1 (0.19.0) - google-apis-core (>= 0.9.0, < 2.a) - google-cloud-core (1.6.0) - google-cloud-env (~> 1.0) - google-cloud-errors (~> 1.0) - google-cloud-env (1.6.0) - faraday (>= 0.17.3, < 3.0) - google-cloud-errors (1.3.1) - google-cloud-storage (1.44.0) - addressable (~> 2.8) - digest-crc (~> 0.4) - google-apis-iamcredentials_v1 (~> 0.1) - google-apis-storage_v1 (~> 0.19.0) - google-cloud-core (~> 1.6) - googleauth (>= 0.16.2, < 2.a) - mini_mime (~> 1.0) - googleauth (1.8.0) - faraday (>= 0.17.3, < 3.a) - jwt (>= 1.4, < 3.0) - multi_json (~> 1.11) - os (>= 0.9, < 2.0) - signet (>= 0.16, < 2.a) - highline (2.0.3) - http-cookie (1.0.5) - domain_name (~> 0.5) - httpclient (2.8.3) - i18n (1.14.1) - concurrent-ruby (~> 1.0) - jmespath (1.6.2) - json (2.6.3) - jwt (2.7.1) - mini_magick (4.12.0) - mini_mime (1.1.5) - minitest (5.20.0) - molinillo (0.8.0) - multi_json (1.15.0) - multipart-post (2.3.0) - nanaimo (0.3.0) - nap (1.1.0) - naturally (2.2.1) - netrc (0.11.0) - optparse (0.1.1) - os (1.1.4) - plist (3.7.0) - public_suffix (4.0.7) - rake (13.0.6) - representable (3.2.0) - declarative (< 0.1.0) - trailblazer-option (>= 0.1.1, < 0.2.0) - uber (< 0.2.0) - retriable (3.1.2) - rexml (3.2.6) - rouge (2.0.7) - ruby-macho (2.5.1) - ruby2_keywords (0.0.5) - rubyzip (2.3.2) - security (0.1.3) - signet (0.18.0) - addressable (~> 2.8) - faraday (>= 0.17.5, < 3.a) - jwt (>= 1.5, < 3.0) - multi_json (~> 1.10) - simctl (1.6.10) - CFPropertyList - naturally - terminal-notifier (2.0.0) - terminal-table (3.0.2) - unicode-display_width (>= 1.1.1, < 3) - trailblazer-option (0.1.2) - tty-cursor (0.7.1) - tty-screen (0.8.1) - tty-spinner (0.9.3) - tty-cursor (~> 0.7) - typhoeus (1.4.0) - ethon (>= 0.9.0) - tzinfo (2.0.6) - concurrent-ruby (~> 1.0) - uber (0.1.0) - unf (0.1.4) - unf_ext - unf_ext (0.0.8.2) - unicode-display_width (2.4.2) - webrick (1.8.1) - word_wrap (1.0.0) - xcode-install (2.8.1) - claide (>= 0.9.1) - fastlane (>= 2.1.0, < 3.0.0) - xcodeproj (1.22.0) - CFPropertyList (>= 2.3.3, < 4.0) - atomos (~> 0.1.3) - claide (>= 1.0.2, < 2.0) - colored2 (~> 3.1) - nanaimo (~> 0.3.0) - rexml (~> 3.2.4) - xcpretty (0.3.0) - rouge (~> 2.0.7) - xcpretty-travis-formatter (1.0.1) - xcpretty (~> 0.2, >= 0.0.7) - -PLATFORMS - arm64-darwin-21 - -DEPENDENCIES - cocoapods (~> 1.12) - fastlane - xcode-install - -RUBY VERSION - ruby 3.0.0p0 - -BUNDLED WITH - 2.2.3 diff --git a/fastlane/Fastfile b/fastlane/Fastfile deleted file mode 100644 index 257de9ff..00000000 --- a/fastlane/Fastfile +++ /dev/null @@ -1,69 +0,0 @@ -# This file contains the fastlane.tools configuration -# You can find the documentation at https://docs.fastlane.tools -# -# For a list of all available actions, check out -# -# https://docs.fastlane.tools/actions -# -# For a list of all available plugins, check out -# -# https://docs.fastlane.tools/plugins/available-plugins -# - -# Uncomment the line if you want fastlane to automatically update itself -# update_fastlane - -default_platform(:ios) - -platform :ios do - desc "Description of what the lane does" - - lane :run_lib_tests do - clean_lib_build_dir - - xcversion(version: ">= 12.1") - run_tests(workspace: "ios/RNKlarnaMobileSDK.xcworkspace", - output_directory: "ios/build/RNKlarnaMobileSDK", - scheme: "RNKlarnaMobileSDK") - end - - lane :clean_lib_build_dir do - sh "rm -rf ios/build/*" - end - - lane :build_test_app_release do - clean_test_apps_build_dir - - build_time_start = DateTime.now - - xcversion(version: ">= 12.1") - gym( - workspace: "TestApp/ios/TestApp.xcworkspace", - scheme: "TestApp", - clean: true, - output_directory: "TestApp/build/", - configuration: "Release", - export_method: "enterprise", - ) - end - - lane :build_test_app_debug do - clean_test_apps_build_dir - - build_time_start = DateTime.now - - xcversion(version: ">= 12.1") - gym( - workspace: "TestApp/ios/TestApp.xcworkspace", - scheme: "TestApp", - clean: true, - output_directory: "TestApp/build/", - configuration: "Debug", - export_method: "enterprise", - ) - end - - lane :clean_test_apps_build_dir do - sh "rm -rf TestApp/build/*" - end -end diff --git a/fastlane/README.md b/fastlane/README.md deleted file mode 100644 index 131d1897..00000000 --- a/fastlane/README.md +++ /dev/null @@ -1,64 +0,0 @@ -fastlane documentation ----- - -# Installation - -Make sure you have the latest version of the Xcode command line tools installed: - -```sh -xcode-select --install -``` - -For _fastlane_ installation instructions, see [Installing _fastlane_](https://docs.fastlane.tools/#installing-fastlane) - -# Available Actions - -## iOS - -### ios run_lib_tests - -```sh -[bundle exec] fastlane ios run_lib_tests -``` - -Description of what the lane does - -### ios clean_lib_build_dir - -```sh -[bundle exec] fastlane ios clean_lib_build_dir -``` - - - -### ios build_test_app_release - -```sh -[bundle exec] fastlane ios build_test_app_release -``` - - - -### ios build_test_app_debug - -```sh -[bundle exec] fastlane ios build_test_app_debug -``` - - - -### ios clean_test_apps_build_dir - -```sh -[bundle exec] fastlane ios clean_test_apps_build_dir -``` - - - ----- - -This README.md is auto-generated and will be re-generated every time [_fastlane_](https://fastlane.tools) is run. - -More information about _fastlane_ can be found on [fastlane.tools](https://fastlane.tools). - -The documentation of _fastlane_ can be found on [docs.fastlane.tools](https://docs.fastlane.tools).