Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DNM] Support/parallelise tests, experiment 2 #8052

Draft
wants to merge 8 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions .github/workflows/build-and-test-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ permissions:
jobs:
determine-affected:
name: "Turbo Affected"
if: ${{github.event.pull_request.head.repo.full_name == github.repository }}
if: ${{false}}
uses: LedgerHQ/ledger-live/.github/workflows/turbo-affected-reusable.yml@develop
with:
head_branch: ${{ github.event.pull_request.head.ref || github.event.merge_group.head_ref }}
Expand All @@ -24,65 +24,65 @@ jobs:
build-desktop:
name: "Build Desktop"
needs: determine-affected
if: ${{contains(needs.determine-affected.outputs.paths, 'ledger-live-desktop') && github.event.pull_request.head.repo.full_name == github.repository }}
if: ${{false}}
uses: LedgerHQ/ledger-live/.github/workflows/build-desktop-reusable.yml@develop
secrets: inherit

test-desktop:
name: "Test Desktop"
needs: determine-affected
if: ${{contains(needs.determine-affected.outputs.paths, 'ledger-live-desktop') && github.event.pull_request.head.repo.full_name == github.repository}}
if: ${{false}}
uses: LedgerHQ/ledger-live/.github/workflows/test-desktop-reusable.yml@develop
secrets: inherit

# LLM
build-mobile:
name: "Build Mobile"
needs: determine-affected
if: ${{contains(needs.determine-affected.outputs.paths, 'ledger-live-mobile') && github.event.pull_request.head.repo.full_name == github.repository}}
if: ${{false}}
uses: LedgerHQ/ledger-live/.github/workflows/build-mobile-reusable.yml@develop
secrets: inherit

test-mobile:
name: "Test Mobile"
needs: determine-affected
if: ${{contains(needs.determine-affected.outputs.paths, 'ledger-live-mobile') && github.event.pull_request.head.repo.full_name == github.repository}}
if: ${{false}}
uses: LedgerHQ/ledger-live/.github/workflows/test-mobile-reusable.yml@develop
secrets: inherit

test-mobile-e2e:
name: "Test Mobile E2E"
needs: determine-affected
if: ${{contains(needs.determine-affected.outputs.paths, 'ledger-live-mobile') && github.event.pull_request.head.repo.full_name == github.repository}}
# needs: determine-affected
if: ${{true}}
uses: LedgerHQ/ledger-live/.github/workflows/test-mobile-e2e-reusable.yml@develop
secrets: inherit

# Tests
test-libraries:
name: "Test Libraries"
needs: determine-affected
if: ${{contains(needs.determine-affected.outputs.paths, 'libs') && github.event.pull_request.head.repo.full_name == github.repository}}
if: ${{false}}
uses: LedgerHQ/ledger-live/.github/workflows/test-libs-reusable.yml@develop
secrets: inherit

test-design-system:
name: "Test Design System"
needs: determine-affected
if: ${{contains(needs.determine-affected.outputs.paths, 'libs/ui') && github.event.pull_request.head.repo.full_name == github.repository}}
if: ${{false}}
uses: LedgerHQ/ledger-live/.github/workflows/test-design-system-reusable.yml@develop
secrets: inherit

test-web-tools:
name: "Test Web Tools"
needs: determine-affected
if: ${{contains(needs.determine-affected.outputs.paths, 'apps/web-tools') && github.event.pull_request.head.repo.full_name == github.repository}}
if: ${{false}}
uses: LedgerHQ/ledger-live/.github/workflows/test-web-tools-reusable.yml@develop
secrets: inherit

test-cli:
name: "Test CLI"
needs: determine-affected
if: ${{contains(needs.determine-affected.outputs.paths, 'apps/cli') && github.event.pull_request.head.repo.full_name == github.repository}}
if: ${{false}}
uses: LedgerHQ/ledger-live/.github/workflows/test-cli-reusable.yml@develop
secrets: inherit

Expand Down
13 changes: 7 additions & 6 deletions .github/workflows/test-mobile-e2e-reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ permissions:
jobs:
detox-tests-ios:
name: "LLM - iOS Detox Tests"
runs-on: [m1, ARM64]
runs-on: [m1, ARM64, pa4-r102-srv-macrunner03]
env:
NODE_OPTIONS: "--max-old-space-size=7168"
LANG: en_US.UTF-8
Expand Down Expand Up @@ -149,7 +149,7 @@ jobs:
allure-report-ios:
name: "Allure Reports Export on Server"
runs-on: [ledger-live-medium]
if: ${{ !cancelled() && github.ref_name == 'develop' }}
if: false
needs: [detox-tests-ios]
steps:
- uses: actions/checkout@v4
Expand All @@ -165,6 +165,7 @@ jobs:
detox-tests-android:
name: "Ledger Live Mobile - Android Detox Tests"
runs-on: [ledger-live-linux-8CPU-32RAM]
if: false
env:
NODE_OPTIONS: "--max-old-space-size=7168"
LANG: en_US.UTF-8
Expand Down Expand Up @@ -297,7 +298,7 @@ jobs:
allure-report-android:
name: "Allure Reports Export on Server"
runs-on: [ledger-live-medium]
if: ${{ !cancelled() && github.ref_name == 'develop' }}
if: false
needs: [detox-tests-android]
steps:
- name: checkout
Expand Down Expand Up @@ -327,7 +328,7 @@ jobs:
JIRA_URL: https://ledgerhq.atlassian.net/browse
TEST_EXECUTION: ${{ matrix.platform == 'android' && inputs.test_execution_android || inputs.test_execution_ios }}
needs: [detox-tests-android, detox-tests-ios]
if: ${{ !cancelled() && inputs.export_to_xray }}
if: false
steps:
- uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -371,7 +372,7 @@ jobs:
report:
needs: [detox-tests-android, detox-tests-ios]
runs-on: ubuntu-latest
if: ${{ !cancelled() && (github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call' || github.event_name == 'pull_request') }}
if: false
steps:
- uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -460,7 +461,7 @@ jobs:
report-on-slack:
runs-on: ubuntu-latest
needs: [detox-tests-android, detox-tests-ios]
if: ${{ failure() && github.event_name == 'push' }}
if: false
steps:
- name: format message
uses: actions/github-script@v7
Expand Down
7 changes: 5 additions & 2 deletions apps/ledger-live-mobile/scripts/e2e-ci.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,18 @@ const bundle_ios_with_cache = async () => {
};

const test_ios = async () => {
await $`pnpm mobile e2e:test${speculos} \
await $`echo 'Starting detox tests with 2 workers...' && pnpm mobile e2e:test${speculos} \
e2e/specs/onboarding.spec.ts e2e/specs/receive/currencies.spec.ts \
-c ios.sim.release \
--loglevel error \
--record-logs all \
--take-screenshots all \
--forceExit \
--headless \
--retries 1 \
--cleanup`;
--cleanup \
--maxWorkers 2 \
`;
};

const build_android = async () => {
Expand Down
Loading