diff --git a/.github/workflows/test-mobile-e2e-reusable.yml b/.github/workflows/test-mobile-e2e-reusable.yml index 2189be17f54b..2cf2e6a67a96 100644 --- a/.github/workflows/test-mobile-e2e-reusable.yml +++ b/.github/workflows/test-mobile-e2e-reusable.yml @@ -89,7 +89,7 @@ jobs: id: caches uses: LedgerHQ/ledger-live/tools/actions/composites/setup-caches@develop with: - skip-pod-cache: "true" + skip-pod-cache: "false" skip-turbo-cache: "false" accountId: ${{ secrets.AWS_ACCOUNT_ID_PROD }} roleName: ${{ secrets.AWS_CACHE_ROLE_NAME }} @@ -108,62 +108,62 @@ jobs: timeout_minutes: 15 command: pnpm i --filter="live-mobile..." --filter="ledger-live" --filter="@ledgerhq/dummy-*-app..." --no-frozen-lockfile --unsafe-perm new_command_on_retry: rm -rf ~/.cocoapods/ && pnpm clean && pnpm i --filter="live-mobile..." --filter="ledger-live" --filter="@ledgerhq/dummy-*-app..." --no-frozen-lockfile --unsafe-perm - - name: cache detox build - uses: tespkg/actions-cache@v1 - if: steps.aws.conclusion == 'success' - id: detox-build - with: - path: ${{ github.workspace }}/apps/ledger-live-mobile/ios/build/Build/Products/Release-iphonesimulator - key: ${{ runner.os }}-detox-${{ hashFiles('apps/ledger-live-mobile/ios/Podfile.lock', 'apps/ledger-live-mobile/ios/ledgerlivemobile.xcodeproj/project.pbxproj', 'apps/ledger-live-mobile/detox.config.js', 'apps/ledger-live-mobile/.env.mock', 'apps/ledger-live-mobile/ios/ledgerlivemobile/AppDelegate.mm') }} - accessKey: ${{ env.AWS_ACCESS_KEY_ID }} - secretKey: ${{ env.AWS_SECRET_ACCESS_KEY }} - sessionToken: ${{ env.AWS_SESSION_TOKEN}} - bucket: ll-gha-s3-cache - region: ${{ secrets.AWS_CACHE_REGION }} - use-fallback: false - - name: Build dependencies - run: | - pnpm build:llm:deps --api="http://127.0.0.1:${{ steps.caches.outputs.port }}" --token="${{ secrets.TURBOREPO_SERVER_TOKEN }}" --team="foo" - - name: Build Dummy Live SDK and Dummy Wallet API apps for testing - run: | - pnpm build:dummy-apps - shell: bash - - name: Create iOS simulator - id: simulator - run: | - ID=$(xcrun simctl create "iOS Simulator" "iPhone 15") - echo "id=$ID" >> $GITHUB_OUTPUT - - name: Build iOS app for Detox test run - if: steps.detox-build.outputs.cache-hit != 'true' - run: pnpm mobile e2e:ci -p ios -b - - name: Build JS Bundle app for Detox test run - if: steps.detox-build.outputs.cache-hit == 'true' - run: pnpm mobile e2e:ci -p ios --bundle - - name: Setup Speculos image and Coin Apps - if: ${{ env.SPECULOS_RUN == 'true' }} - uses: LedgerHQ/ledger-live/tools/actions/composites/setup-speculos_image@develop - with: - coinapps_path: ${{ env.COINAPPS }} - speculos_tag: ${{ env.SPECULOS_IMAGE_TAG }} - bot_id: ${{ secrets.GH_BOT_APP_ID }} - bot_key: ${{ secrets.GH_BOT_PRIVATE_KEY }} - - name: Test iOS app - id: detox - timeout-minutes: 75 - run: pnpm mobile e2e:ci -p ios -t $([[ "$INPUT_SPECULOS" == "true" ]] && printf %s '--speculos') - env: - SEED: ${{ secrets.SEED_QAA_B2C }} - INPUT_SPECULOS: ${{ env.SPECULOS_RUN }} - - name: Delete iOS simulator - if: ${{ always() && steps.simulator.outputs.id }} - run: | - xcrun simctl delete ${{ steps.simulator.outputs.id }} - - name: Upload test artifacts - uses: actions/upload-artifact@v4 - if: ${{ !cancelled() || steps.detox.outcome == 'cancelled' }} - with: - name: "ios-test-artifacts" - path: apps/ledger-live-mobile/artifacts +# - name: cache detox build +# uses: tespkg/actions-cache@v1 +# if: steps.aws.conclusion == 'success' +# id: detox-build +# with: +# path: ${{ github.workspace }}/apps/ledger-live-mobile/ios/build/Build/Products/Release-iphonesimulator +# key: ${{ runner.os }}-detox-${{ hashFiles('apps/ledger-live-mobile/ios/Podfile.lock', 'apps/ledger-live-mobile/ios/ledgerlivemobile.xcodeproj/project.pbxproj', 'apps/ledger-live-mobile/detox.config.js', 'apps/ledger-live-mobile/.env.mock', 'apps/ledger-live-mobile/ios/ledgerlivemobile/AppDelegate.mm') }} +# accessKey: ${{ env.AWS_ACCESS_KEY_ID }} +# secretKey: ${{ env.AWS_SECRET_ACCESS_KEY }} +# sessionToken: ${{ env.AWS_SESSION_TOKEN}} +# bucket: ll-gha-s3-cache +# region: ${{ secrets.AWS_CACHE_REGION }} +# use-fallback: false +# - name: Build dependencies +# run: | +# pnpm build:llm:deps --api="http://127.0.0.1:${{ steps.caches.outputs.port }}" --token="${{ secrets.TURBOREPO_SERVER_TOKEN }}" --team="foo" +# - name: Build Dummy Live SDK and Dummy Wallet API apps for testing +# run: | +# pnpm build:dummy-apps +# shell: bash +# - name: Create iOS simulator +# id: simulator +# run: | +# ID=$(xcrun simctl create "iOS Simulator" "iPhone 15") +# echo "id=$ID" >> $GITHUB_OUTPUT +# - name: Build iOS app for Detox test run +# if: steps.detox-build.outputs.cache-hit != 'true' +# run: pnpm mobile e2e:ci -p ios -b +# - name: Build JS Bundle app for Detox test run +# if: steps.detox-build.outputs.cache-hit == 'true' +# run: pnpm mobile e2e:ci -p ios --bundle +# - name: Setup Speculos image and Coin Apps +# if: ${{ env.SPECULOS_RUN == 'true' }} +# uses: LedgerHQ/ledger-live/tools/actions/composites/setup-speculos_image@develop +# with: +# coinapps_path: ${{ env.COINAPPS }} +# speculos_tag: ${{ env.SPECULOS_IMAGE_TAG }} +# bot_id: ${{ secrets.GH_BOT_APP_ID }} +# bot_key: ${{ secrets.GH_BOT_PRIVATE_KEY }} +# - name: Test iOS app +# id: detox +# timeout-minutes: 75 +# run: pnpm mobile e2e:ci -p ios -t $([[ "$INPUT_SPECULOS" == "true" ]] && printf %s '--speculos') +# env: +# SEED: ${{ secrets.SEED_QAA_B2C }} +# INPUT_SPECULOS: ${{ env.SPECULOS_RUN }} +# - name: Delete iOS simulator +# if: ${{ always() && steps.simulator.outputs.id }} +# run: | +# xcrun simctl delete ${{ steps.simulator.outputs.id }} +# - name: Upload test artifacts +# uses: actions/upload-artifact@v4 +# if: ${{ !cancelled() || steps.detox.outcome == 'cancelled' }} +# with: +# name: "ios-test-artifacts" +# path: apps/ledger-live-mobile/artifacts allure-report-ios: name: "Allure Reports Export on Server" diff --git a/apps/ledger-live-mobile/README.md b/apps/ledger-live-mobile/README.md index 8c64d602c0e1..959446c66be2 100644 --- a/apps/ledger-live-mobile/README.md +++ b/apps/ledger-live-mobile/README.md @@ -211,4 +211,4 @@ For a smooth and quick integration: - See the developers’ documentation on the [Developer Portal](https://developers.ledger.com/docs/coin/general-process/) and - Go on [Discord](https://developers.ledger.com/discord-pro/) to chat with developer support and the developer community. ---- \ No newline at end of file +--- diff --git a/apps/ledger-live-mobile/scripts/post.mjs b/apps/ledger-live-mobile/scripts/post.mjs index 6226c9be0c42..43eb3e3489f2 100644 --- a/apps/ledger-live-mobile/scripts/post.mjs +++ b/apps/ledger-live-mobile/scripts/post.mjs @@ -53,7 +53,12 @@ function runHashChecks(writeCache = false) { const lock = join(__dirname, "..", "ios", "Podfile.lock"); const pkg = join(__dirname, "..", "package.json"); - if (!existsSync(pods)) return false; + if (!existsSync(pods)) { + + echo(chalk.yellow("DEBUG pods don't exist")); + + return false; + } const podsHash = computeMetaHash([pods]); const lockHash = computeMetaHash([lock]); @@ -68,6 +73,9 @@ function runHashChecks(writeCache = false) { const cache = getCache(cachePath); + echo(chalk.yellow("DEBUG cache:" + JSON.stringify(cache))); + echo(chalk.yellow("DEBUG result:" + JSON.stringify(result))); + if (!cache || writeCache) { try { const data = JSON.stringify(result); @@ -167,7 +175,8 @@ BRAZE_CUSTOM_ENDPOINT="sdk.fra-02.braze.eu"`; |\\_/| \\___/ `; - echo(chalk.red(str)); + echo(chalk.yellow(str)); + echo(chalk.red(error)); await $`exit 1`; } } diff --git a/package.json b/package.json index ccccba29baf0..bd9d205eedec 100644 --- a/package.json +++ b/package.json @@ -183,8 +183,8 @@ "@ledgerhq/pnpm-utils": "workspace:*", "@typescript-eslint/eslint-plugin": "6.21.0", "@typescript-eslint/parser": "6.21.0", - "chalk": "4.1.2", "eslint": "8.57.0", + "chalk": "4.1.2", "eslint-config-prettier": "9.1.0", "eslint-plugin-json": "3.1.0", "eslint-plugin-prettier": "5.1.3",