From b92eb69382b9caf579e3999d9e77383c413709fd Mon Sep 17 00:00:00 2001 From: Abdurrahman SASTIM Date: Wed, 18 Dec 2024 12:16:03 +0100 Subject: [PATCH 1/5] test: update detox and jest reporter --- apps/ledger-live-mobile/package.json | 4 +- package.json | 7 +- ...etox@20.26.2.patch => detox@20.28.0.patch} | 0 pnpm-lock.yaml | 86 +++++++++++-------- 4 files changed, 58 insertions(+), 39 deletions(-) rename patches/{detox@20.26.2.patch => detox@20.28.0.patch} (100%) diff --git a/apps/ledger-live-mobile/package.json b/apps/ledger-live-mobile/package.json index 797b789a2853..c267fcbbdcf1 100644 --- a/apps/ledger-live-mobile/package.json +++ b/apps/ledger-live-mobile/package.json @@ -278,7 +278,7 @@ "babel-jest": "29.7.0", "body-parser": "1.20.3", "cors": "2.8.5", - "detox": "20.26.2", + "detox": "20.28.0", "detox-allure2-adapter": "1.0.0-alpha.12", "eslint-import-resolver-typescript": "3.6.1", "eslint-plugin-detox": "1.0.0", @@ -290,7 +290,7 @@ "expect": "27.5.1", "express": "4.19.2", "jest": "29.7.0", - "jest-allure2-reporter": "2.0.0-beta.25", + "jest-allure2-reporter": "2.0.0", "jest-circus": "29.7.0", "jest-docblock": "29.7.0", "jest-environment-node": "29.7.0", diff --git a/package.json b/package.json index 4e690290233d..9e18103d1262 100644 --- a/package.json +++ b/package.json @@ -214,7 +214,7 @@ "rn-fetch-blob@0.12.0": "patches/rn-fetch-blob@0.12.0.patch", "react-native-image-crop-tools@1.6.4": "patches/react-native-image-crop-tools@1.6.4.patch", "asyncstorage-down@4.2.0": "patches/asyncstorage-down@4.2.0.patch", - "detox@20.26.2": "patches/detox@20.26.2.patch", + "detox@20.28.0": "patches/detox@20.28.0.patch", "usb@2.9.0": "patches/usb@2.9.0.patch", "react-native-video@5.2.1": "patches/react-native-video@5.2.1.patch", "@hashgraph/sdk@2.14.2": "patches/@hashgraph__sdk@2.14.2.patch", @@ -233,6 +233,11 @@ "dependencies": { "tslib": "*" } + }, + "detox": { + "dependencies": { + "expect": "*" + } } } }, diff --git a/patches/detox@20.26.2.patch b/patches/detox@20.28.0.patch similarity index 100% rename from patches/detox@20.26.2.patch rename to patches/detox@20.28.0.patch diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 576c7026be33..367c5f9f3d95 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -14,7 +14,7 @@ overrides: '@hashgraph/sdk>@hashgraph/cryptography': 1.1.2 '@ethersproject/providers>ws': 7.5.10 -packageExtensionsChecksum: bcc0ac67c2d7bcc88fe46412ebcf46be +packageExtensionsChecksum: 505470d279d34dbf557b1005424e3d1d pnpmfileChecksum: y32iywntuncngd3rihdkxbogue @@ -31,9 +31,9 @@ patchedDependencies: buffer@6.0.3: hash: 2xnca52oxhztvr7iaoovwclcze path: patches/buffer@6.0.3.patch - detox@20.26.2: + detox@20.28.0: hash: yanhspfjw3apvvf4gev5ovygia - path: patches/detox@20.26.2.patch + path: patches/detox@20.28.0.patch react-native-fast-crypto@2.2.0: hash: jdmv3zyvsaug2f6l23zgrmwdli path: patches/react-native-fast-crypto@2.2.0.patch @@ -1453,11 +1453,11 @@ importers: specifier: 2.8.5 version: 2.8.5 detox: - specifier: 20.26.2 - version: 20.26.2(patch_hash=yanhspfjw3apvvf4gev5ovygia)(jest@29.7.0(ts-node@10.9.2(@swc/core@1.4.11)(typescript@5.4.3))) + specifier: 20.28.0 + version: 20.28.0(patch_hash=yanhspfjw3apvvf4gev5ovygia)(jest@29.7.0(ts-node@10.9.2(@swc/core@1.4.11)(typescript@5.4.3))) detox-allure2-adapter: specifier: 1.0.0-alpha.12 - version: 1.0.0-alpha.12(detox@20.26.2(patch_hash=yanhspfjw3apvvf4gev5ovygia)(jest@29.7.0(ts-node@10.9.2(@swc/core@1.4.11)(typescript@5.4.3))))(jest-allure2-reporter@2.0.0-beta.25(@jest/reporters@29.7.0)(jest-docblock@29.7.0)(jest-environment-node@29.7.0)(jest@29.7.0(ts-node@10.9.2(@swc/core@1.4.11)(typescript@5.4.3)))) + version: 1.0.0-alpha.12(detox@20.28.0(patch_hash=yanhspfjw3apvvf4gev5ovygia)(jest@29.7.0(ts-node@10.9.2(@swc/core@1.4.11)(typescript@5.4.3))))(jest-allure2-reporter@2.0.0(@jest/reporters@29.7.0)(jest-docblock@29.7.0)(jest-environment-node@29.7.0)(jest@29.7.0(ts-node@10.9.2(@swc/core@1.4.11)(typescript@5.4.3)))) eslint-import-resolver-typescript: specifier: 3.6.1 version: 3.6.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.4.3))(eslint-plugin-import@2.29.1)(eslint@8.57.0) @@ -1489,8 +1489,8 @@ importers: specifier: 29.7.0 version: 29.7.0(ts-node@10.9.2(@swc/core@1.4.11)(typescript@5.4.3)) jest-allure2-reporter: - specifier: 2.0.0-beta.25 - version: 2.0.0-beta.25(@jest/reporters@29.7.0)(jest-docblock@29.7.0)(jest-environment-node@29.7.0)(jest@29.7.0(ts-node@10.9.2(@swc/core@1.4.11)(typescript@5.4.3))) + specifier: 2.0.0 + version: 2.0.0(@jest/reporters@29.7.0)(jest-docblock@29.7.0)(jest-environment-node@29.7.0)(jest@29.7.0(ts-node@10.9.2(@swc/core@1.4.11)(typescript@5.4.3))) jest-circus: specifier: 29.7.0 version: 29.7.0 @@ -19045,11 +19045,11 @@ packages: detox: 20.14.2-smoke.0 || >20.14.5 jest-allure2-reporter: ^2.0.0-beta.15 - detox-copilot@0.0.0: - resolution: {integrity: sha512-BasCw/JXlplL1UZfe19xJYT0i0JU4tdGPWutsmybGy6166Jvj2ryikbgoE1ls44F+41p9Y0Yei0cdBC7KawXeQ==} + detox-copilot@0.0.24: + resolution: {integrity: sha512-42g0QyJS31URl28YRxc4hGozSXhbbB1sKwzxEjZR9WtLoSx6WYDsQkQD8+yP5t1NExiSCZAfvNmBw8PYQwDKwg==} - detox@20.26.2: - resolution: {integrity: sha512-pJU8WHD7GuoGlCuDzZxCD784mQfOO/ihRxe2/EebnesniWnV6FOwbC+32J1kGivhAdyvvPawfMQ7PoD4FwkxfA==} + detox@20.28.0: + resolution: {integrity: sha512-JeUkWNnYE7lqby3S9AeYJP3ttCBKH+qZWACjWXwvSbe3tm6JeXvecVUYkzSoNfC4IzTX5p+rWvG0IPsfOsZSFw==} engines: {node: '>=14'} hasBin: true peerDependencies: @@ -20589,8 +20589,8 @@ packages: fast-stable-stringify@1.0.0: resolution: {integrity: sha512-wpYMUmFu5f00Sm0cj2pfivpmawLZ0NKdviQ4w9zJeR8JVtOpOxHmLaJuj0vxvGqMJQWyP/COUkF75/57OKyRag==} - fast-uri@3.0.2: - resolution: {integrity: sha512-GR6f0hD7XXyNJa25Tb9BuIdN0tdr+0BMi6/CJPH3wJO1JjNG3n/VsSw38AwRdKZABm8lGbPfakLRkYzx2V9row==} + fast-uri@3.0.3: + resolution: {integrity: sha512-aLrHthzCjH5He4Z2H9YZ+v6Ujb9ocRuW6ZzkJQOrTxleEijANq4v1TsaPaVG1PZcuurEzrLcWRyYBYXD5cEiaw==} fast-url-parser@1.1.3: resolution: {integrity: sha512-5jOCVXADYNuRkKFzNJ0dCCewsZiYo0dz8QNYljkOpFC6r2U4OBmKtvm/Tsuh4w1YYdDqDb31a8TVhBJ2OJKdqQ==} @@ -22286,8 +22286,8 @@ packages: engines: {node: '>=8'} hasBin: true - jest-allure2-reporter@2.0.0-beta.25: - resolution: {integrity: sha512-SKAWiukVjptF2AIVPPyfpJNH651TFs0xRX5V71S2Z7TGBJZDBdY0Wm875PLNLb7l9WsX6N2veMNYOThOaOkg3Q==} + jest-allure2-reporter@2.0.0: + resolution: {integrity: sha512-xC/bXmcvo6KM2mcsUuuNkQHZwG9cCkYvbcKGAN/tZbpG9AW5JQ5i3evvpKaaQnTx6oE5pWMfqdYjUnusC28tFA==} engines: {node: '>=16.20.0'} peerDependencies: jest: '>=27.2.5' @@ -27614,6 +27614,10 @@ packages: shell-quote@1.8.1: resolution: {integrity: sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA==} + shell-quote@1.8.2: + resolution: {integrity: sha512-AzqKpGKjrj7EM6rKVQEPpB288oCfnrEIuyoT9cyF4nmGa7V8Zk6f7RRqYisX8X9m+Q7bd632aZW4ky7EhbQztA==} + engines: {node: '>= 0.4'} + shimmer@1.2.1: resolution: {integrity: sha512-sQTKC1Re/rM6XyFM6fIAGHRPVGvyXfgzIDvzoq608vM+jeyVD0Tu1E6Np0Kc2zAIFWIj963V2800iF/9LPieQw==} @@ -27969,6 +27973,9 @@ packages: stream-json@1.8.0: resolution: {integrity: sha512-HZfXngYHUAr1exT4fxlbc1IOce1RYxp2ldeaf97LYCOPSoOqY/1Psp7iGvpb+6JIOgkra9zDYnPX01hGAHzEPw==} + stream-json@1.9.1: + resolution: {integrity: sha512-uWkjJ+2Nt/LO9Z/JyKZbMusL8Dkh97uUBTv3AJQ74y07lVahLY4eEFsPsE97pxYBwr8nnjMAIch5eqI0gPShyw==} + stream-log-stats@3.0.2: resolution: {integrity: sha512-393j7aeF9iRdHvyANqEQU82UQmpw2CTxgsT83caefh+lOxavVLbVrw8Mr4zjXeZLh2+xeHZMKfVx4T0rJ/EchA==} engines: {node: '>=8.0.0'} @@ -37115,7 +37122,7 @@ snapshots: '@npmcli/fs@3.1.1': dependencies: - semver: 7.5.4 + semver: 7.6.3 '@npmcli/move-file@1.1.2': dependencies: @@ -45402,7 +45409,7 @@ snapshots: ajv@8.17.1: dependencies: fast-deep-equal: 3.1.3 - fast-uri: 3.0.2 + fast-uri: 3.0.3 json-schema-traverse: 1.0.0 require-from-string: 2.0.2 @@ -45922,7 +45929,7 @@ snapshots: loader-utils: 2.0.4 make-dir: 3.1.0 schema-utils: 2.7.1 - webpack: 5.94.0(webpack-cli@4.10.0) + webpack: 5.94.0 babel-loader@9.1.3(@babel/core@7.24.3)(webpack@5.94.0(esbuild@0.19.12)): dependencies: @@ -46788,14 +46795,14 @@ snapshots: dependencies: '@flatten-js/interval-tree': 1.1.3 multi-sort-stream: 1.0.4 - stream-json: 1.8.0 + stream-json: 1.9.1 trace-event-lib: 1.4.1 bunyamin@1.6.3(bunyan@2.0.5): dependencies: '@flatten-js/interval-tree': 1.1.3 multi-sort-stream: 1.0.4 - stream-json: 1.8.0 + stream-json: 1.9.1 trace-event-lib: 1.4.1 optionalDependencies: bunyan: 2.0.5 @@ -48487,16 +48494,16 @@ snapshots: transitivePeerDependencies: - supports-color - detox-allure2-adapter@1.0.0-alpha.12(detox@20.26.2(patch_hash=yanhspfjw3apvvf4gev5ovygia)(jest@29.7.0(ts-node@10.9.2(@swc/core@1.4.11)(typescript@5.4.3))))(jest-allure2-reporter@2.0.0-beta.25(@jest/reporters@29.7.0)(jest-docblock@29.7.0)(jest-environment-node@29.7.0)(jest@29.7.0(ts-node@10.9.2(@swc/core@1.4.11)(typescript@5.4.3)))): + detox-allure2-adapter@1.0.0-alpha.12(detox@20.28.0(patch_hash=yanhspfjw3apvvf4gev5ovygia)(jest@29.7.0(ts-node@10.9.2(@swc/core@1.4.11)(typescript@5.4.3))))(jest-allure2-reporter@2.0.0(@jest/reporters@29.7.0)(jest-docblock@29.7.0)(jest-environment-node@29.7.0)(jest@29.7.0(ts-node@10.9.2(@swc/core@1.4.11)(typescript@5.4.3)))): dependencies: archiver: 6.0.2 - detox: 20.26.2(patch_hash=yanhspfjw3apvvf4gev5ovygia)(jest@29.7.0(ts-node@10.9.2(@swc/core@1.4.11)(typescript@5.4.3))) - jest-allure2-reporter: 2.0.0-beta.25(@jest/reporters@29.7.0)(jest-docblock@29.7.0)(jest-environment-node@29.7.0)(jest@29.7.0(ts-node@10.9.2(@swc/core@1.4.11)(typescript@5.4.3))) + detox: 20.28.0(patch_hash=yanhspfjw3apvvf4gev5ovygia)(jest@29.7.0(ts-node@10.9.2(@swc/core@1.4.11)(typescript@5.4.3))) + jest-allure2-reporter: 2.0.0(@jest/reporters@29.7.0)(jest-docblock@29.7.0)(jest-environment-node@29.7.0)(jest@29.7.0(ts-node@10.9.2(@swc/core@1.4.11)(typescript@5.4.3))) tslib: 2.6.2 - detox-copilot@0.0.0: {} + detox-copilot@0.0.24: {} - detox@20.26.2(patch_hash=yanhspfjw3apvvf4gev5ovygia)(jest@29.7.0(ts-node@10.9.2(@swc/core@1.4.11)(typescript@5.4.3))): + detox@20.28.0(patch_hash=yanhspfjw3apvvf4gev5ovygia)(jest@29.7.0(ts-node@10.9.2(@swc/core@1.4.11)(typescript@5.4.3))): dependencies: '@jest/reporters': 29.7.0 ajv: 8.17.1 @@ -48505,8 +48512,9 @@ snapshots: caf: 15.0.1 chalk: 4.1.2 child-process-promise: 2.2.1 - detox-copilot: 0.0.0 + detox-copilot: 0.0.24 execa: 5.1.1 + expect: 27.5.1 find-up: 5.0.0 fs-extra: 11.2.0 funpermaproxy: 1.1.0 @@ -48525,9 +48533,9 @@ snapshots: sanitize-filename: 1.6.3 semver: 7.5.4 serialize-error: 8.1.0 - shell-quote: 1.8.1 + shell-quote: 1.8.2 signal-exit: 3.0.7 - stream-json: 1.8.0 + stream-json: 1.9.1 strip-ansi: 6.0.1 telnet-client: 1.2.8 tempfile: 2.0.0 @@ -50620,7 +50628,7 @@ snapshots: fast-stable-stringify@1.0.0: {} - fast-uri@3.0.2: {} + fast-uri@3.0.3: {} fast-url-parser@1.1.3: dependencies: @@ -50700,7 +50708,7 @@ snapshots: dependencies: loader-utils: 2.0.4 schema-utils: 3.3.0 - webpack: 5.94.0(webpack-cli@4.10.0) + webpack: 5.94.0 file-selector@0.6.0: dependencies: @@ -51768,7 +51776,7 @@ snapshots: pretty-error: 4.0.0 tapable: 2.2.1 optionalDependencies: - webpack: 5.94.0(webpack-cli@4.10.0) + webpack: 5.94.0 htmlparser2@6.1.0: dependencies: @@ -52609,7 +52617,7 @@ snapshots: - bufferutil - utf-8-validate - jest-allure2-reporter@2.0.0-beta.25(@jest/reporters@29.7.0)(jest-docblock@29.7.0)(jest-environment-node@29.7.0)(jest@29.7.0(ts-node@10.9.2(@swc/core@1.4.11)(typescript@5.4.3))): + jest-allure2-reporter@2.0.0(@jest/reporters@29.7.0)(jest-docblock@29.7.0)(jest-environment-node@29.7.0)(jest@29.7.0(ts-node@10.9.2(@swc/core@1.4.11)(typescript@5.4.3))): dependencies: bunyamin: 1.6.3 ci-info: 3.9.0 @@ -57283,7 +57291,7 @@ snapshots: dependencies: hosted-git-info: 4.1.0 is-core-module: 2.13.1 - semver: 7.5.4 + semver: 7.6.3 validate-npm-package-license: 3.0.4 normalize-path@3.0.0: {} @@ -60917,6 +60925,8 @@ snapshots: shell-quote@1.8.1: {} + shell-quote@1.8.2: {} + shimmer@1.2.1: {} side-channel@1.0.6: @@ -61337,6 +61347,10 @@ snapshots: dependencies: stream-chain: 2.2.5 + stream-json@1.9.1: + dependencies: + stream-chain: 2.2.5 + stream-log-stats@3.0.2: dependencies: JSONStream: 1.3.5 @@ -62171,7 +62185,7 @@ snapshots: schema-utils: 3.3.0 serialize-javascript: 6.0.2 terser: 5.36.0 - webpack: 5.94.0(webpack-cli@4.10.0) + webpack: 5.94.0 transitivePeerDependencies: - metro @@ -64247,7 +64261,7 @@ snapshots: mime-types: 2.1.35 range-parser: 1.2.1 schema-utils: 4.2.0 - webpack: 5.94.0(webpack-cli@4.10.0) + webpack: 5.94.0 webpack-dev-middleware@6.1.2(webpack@5.94.0(esbuild@0.19.12)): dependencies: From f9f8754526c16822f1c0965b9dea92b6bd24500d Mon Sep 17 00:00:00 2001 From: Abdurrahman SASTIM Date: Wed, 18 Dec 2024 13:36:30 +0100 Subject: [PATCH 2/5] ci: fix sharding for PR --- .github/workflows/test-mobile-e2e-reusable.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test-mobile-e2e-reusable.yml b/.github/workflows/test-mobile-e2e-reusable.yml index 0d1ef655b5cd..06bc8ff129e6 100644 --- a/.github/workflows/test-mobile-e2e-reusable.yml +++ b/.github/workflows/test-mobile-e2e-reusable.yml @@ -207,10 +207,10 @@ jobs: shardIndex: [1, 2, 3] shardTotal: [3, 1] exclude: - - shardIndex: ${{ (github.event.inputs.speculos_tests == 'false' || github.event_name == 'push') && '2' }} - - shardIndex: ${{ (github.event.inputs.speculos_tests == 'false' || github.event_name == 'push') && '3' }} - - shardTotal: ${{ (github.event.inputs.speculos_tests == 'false' || github.event_name == 'push') && '3' }} - - shardTotal: ${{ github.event.inputs.speculos_tests != 'false' && github.event_name != 'push' && '1' }} + - shardIndex: ${{ (github.event.inputs.speculos_tests == 'false' || github.event_name == 'push' || github.event_name == 'pull_request') && '2' }} + - shardIndex: ${{ (github.event.inputs.speculos_tests == 'false' || github.event_name == 'push' || github.event_name == 'pull_request') && '3' }} + - shardTotal: ${{ (github.event.inputs.speculos_tests == 'false' || github.event_name == 'push' || github.event_name == 'pull_request') && '3' }} + - shardTotal: ${{ github.event.inputs.speculos_tests != 'false' && github.event_name != 'push' && github.event_name != 'pull_request' && '1' }} steps: - uses: actions/checkout@v4 From 85b551d71d1e7d7fc8d1f1ae7858b8f0acd1eae5 Mon Sep 17 00:00:00 2001 From: Abdurrahman SASTIM Date: Wed, 18 Dec 2024 13:38:36 +0100 Subject: [PATCH 3/5] ci: test no sharding for PR --- .github/workflows/build-and-test-pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-and-test-pr.yml b/.github/workflows/build-and-test-pr.yml index 9c615c5467e3..5760ee1cec92 100644 --- a/.github/workflows/build-and-test-pr.yml +++ b/.github/workflows/build-and-test-pr.yml @@ -54,7 +54,7 @@ jobs: name: "Test Mobile E2E" needs: determine-affected if: ${{contains(needs.determine-affected.outputs.paths, 'ledger-live-mobile') && !github.event.pull_request.head.repo.fork}} - uses: LedgerHQ/ledger-live/.github/workflows/test-mobile-e2e-reusable.yml@develop + uses: LedgerHQ/ledger-live/.github/workflows/test-mobile-e2e-reusable.yml@support/qaa-395_update_detox secrets: inherit # Tests From c92c7bb6bd33bb42257223a84b71cd472b59cdbe Mon Sep 17 00:00:00 2001 From: Abdurrahman SASTIM Date: Wed, 18 Dec 2024 14:34:46 +0100 Subject: [PATCH 4/5] Revert "ci: test no sharding for PR" This reverts commit 85b551d71d1e7d7fc8d1f1ae7858b8f0acd1eae5. --- .github/workflows/build-and-test-pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-and-test-pr.yml b/.github/workflows/build-and-test-pr.yml index 5760ee1cec92..9c615c5467e3 100644 --- a/.github/workflows/build-and-test-pr.yml +++ b/.github/workflows/build-and-test-pr.yml @@ -54,7 +54,7 @@ jobs: name: "Test Mobile E2E" needs: determine-affected if: ${{contains(needs.determine-affected.outputs.paths, 'ledger-live-mobile') && !github.event.pull_request.head.repo.fork}} - uses: LedgerHQ/ledger-live/.github/workflows/test-mobile-e2e-reusable.yml@support/qaa-395_update_detox + uses: LedgerHQ/ledger-live/.github/workflows/test-mobile-e2e-reusable.yml@develop secrets: inherit # Tests From 5c084558d20c1832ce53b3b7be7d22ae7e2fa905 Mon Sep 17 00:00:00 2001 From: Abdurrahman SASTIM Date: Wed, 18 Dec 2024 15:12:05 +0100 Subject: [PATCH 5/5] test: store the runner name for allure timeline --- apps/ledger-live-mobile/e2e/jest.config.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apps/ledger-live-mobile/e2e/jest.config.js b/apps/ledger-live-mobile/e2e/jest.config.js index 71f0fa4f95ab..02a18254d41e 100644 --- a/apps/ledger-live-mobile/e2e/jest.config.js +++ b/apps/ledger-live-mobile/e2e/jest.config.js @@ -6,6 +6,9 @@ const jestAllure2ReporterOptions = { issue: "https://ledgerhq.atlassian.net/browse/{{name}}", tms: "https://ledgerhq.atlassian.net/browse/{{name}}", }, + labels: { + host: process.env.RUNNER_NAME, + }, }, overwrite: false, environment: async ({ $ }) => {