Skip to content

Commit

Permalink
Merge branch 'release'
Browse files Browse the repository at this point in the history
  • Loading branch information
live-github-bot[bot] committed Oct 8, 2024
2 parents 0aa4d67 + 340d27d commit b805741
Show file tree
Hide file tree
Showing 614 changed files with 27,551 additions and 196,801 deletions.
14 changes: 13 additions & 1 deletion .github/workflows/build-and-test-external.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: ${{contains(needs.determine-affected.outputs.paths, 'ledger-live-desktop') && github.event.pull_request.head.repo.full_name != github.repository }}
if: ${{github.event.pull_request.head.repo.full_name != github.repository }}
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 @@ -26,18 +26,30 @@ jobs:
needs: determine-affected
if: ${{contains(needs.determine-affected.outputs.paths, 'ledger-live-desktop') && github.event.pull_request.head.repo.full_name != github.repository }}
uses: LedgerHQ/ledger-live/.github/workflows/build-desktop-external-reusable.yml@develop
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
secrets: inherit

test-desktop-external:
name: "[External] 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 }}
uses: LedgerHQ/ledger-live/.github/workflows/test-desktop-external-reusable.yml@develop
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
secrets: inherit

build-mobile-external:
name: "[External] 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}}
uses: LedgerHQ/ledger-live/.github/workflows/build-mobile-external-reusable.yml@develop
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
secrets: inherit

# Final Check required
ok:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/build-and-test-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ permissions:
jobs:
determine-affected:
name: "Turbo Affected"
if: ${{github.event.pull_request.head.repo.full_name == github.repository }}
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 Down
18 changes: 9 additions & 9 deletions .github/workflows/build-desktop-external-reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,18 @@ name: "@Desktop • Build App (external)"

on:
workflow_call:
workflow_dispatch:
inputs:
ref:
type: string
description: |
If you run this manually, and want to run on a PR, the correct ref should be refs/pull/{PR_NUMBER}/merge to
have the "normal" scenario involving checking out a merge commit between your branch and the base branch.
If you want to run only on a branch or specific commit, you can use either the sha or the branch name instead (prefer the first verion for PRs).
required: false
login:
description: The GitHub username that triggered the workflow
required: false
base_ref:
description: The base branch to merge the head into when checking out the code
required: false
required: true
repository:
description: The repository to checkout the code from
type: string
required: true

jobs:
build-desktop-app:
Expand Down Expand Up @@ -46,7 +44,9 @@ jobs:
}
- uses: actions/checkout@v4
with:
ref: ${{ github.ref_name }}
ref: ${{ inputs.ref }}
repository: ${{ inputs.repository }}
token: ${{ secrets.GITHUB_TOKEN }}
persist-credentials: false
- name: Setup git user
uses: LedgerHQ/ledger-live/tools/actions/composites/setup-git-user@develop
Expand Down
29 changes: 14 additions & 15 deletions .github/workflows/build-mobile-external-reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,37 +2,34 @@ name: "@Mobile • Build App (external)"

on:
workflow_call:
workflow_dispatch:
inputs:
ref:
type: string
description: |
If you run this manually, and want to run on a PR, the correct ref should be refs/pull/{PR_NUMBER}/merge to
have the "normal" scenario involving checking out a merge commit between your branch and the base branch.
If you want to run only on a branch or specific commit, you can use either the sha or the branch name instead (prefer the first verion for PRs).
login:
description: The GitHub username that triggered the workflow
required: false
base_ref:
description: The base branch to merge the head into when checking out the code
required: false

concurrency:
group: ${{ github.workflow }}-${{ github.ref_name != 'develop' && github.ref || github.run_id }}
cancel-in-progress: true
required: true
repository:
description: The repository to checkout the code from
type: string
required: true

permissions:
contents: read

jobs:
build-mobile-app-android:
name: "Build Ledger Live Mobile (Android)"
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
env:
NODE_OPTIONS: "--max-old-space-size=7168"
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.ref_name }}
ref: ${{ inputs.ref }}
repository: ${{ inputs.repository }}
token: ${{ secrets.GITHUB_TOKEN }}
persist-credentials: false
- name: Setup git user
uses: LedgerHQ/ledger-live/tools/actions/composites/setup-git-user@develop
Expand Down Expand Up @@ -92,7 +89,9 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.ref_name }}
ref: ${{ inputs.ref }}
repository: ${{ inputs.repository }}
token: ${{ secrets.GITHUB_TOKEN }}
persist-credentials: false
- name: Setup git user
uses: LedgerHQ/ledger-live/tools/actions/composites/setup-git-user@develop
Expand All @@ -105,7 +104,7 @@ jobs:
run: pnpm i --filter="live-mobile..." --filter="ledger-live" --no-frozen-lockfile --unsafe-perm

report:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
needs: [build-mobile-app-android, build-mobile-app-ios]
if: ${{ !cancelled() && github.event_name == 'workflow_dispatch' }}
steps:
Expand Down
63 changes: 25 additions & 38 deletions .github/workflows/test-desktop-external-reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,18 @@ name: "@Desktop • Test App (external)"

on:
workflow_call:
workflow_dispatch:
inputs:
ref:
type: string
description: |
If you run this manually, and want to run on a PR, the correct ref should be refs/pull/{PR_NUMBER}/merge to
have the "normal" scenario involving checking out a merge commit between your branch and the base branch.
If you want to run only on a branch or specific commit, you can use either the sha or the branch name instead (prefer the first verion for PRs).
required: false
login:
description: The GitHub username that triggered the workflow
required: false
base_ref:
description: The base branch to merge the head into when checking out the code
required: false
required: true
repository:
description: The repository to checkout the code from
type: string
required: true

permissions:
id-token: write
Expand All @@ -27,12 +25,14 @@ jobs:
env:
NODE_OPTIONS: "--max-old-space-size=7168"
FORCE_COLOR: 3
CI_OS: ubuntu-latest
runs-on: ubuntu-latest
CI_OS: ubuntu-22.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.ref_name }}
ref: ${{ inputs.ref }}
repository: ${{ inputs.repository }}
token: ${{ secrets.GITHUB_TOKEN }}
persist-credentials: false
- name: Setup the toolchain
uses: LedgerHQ/ledger-live/tools/actions/composites/setup-toolchain@develop
Expand Down Expand Up @@ -63,12 +63,14 @@ jobs:
env:
NODE_OPTIONS: "--max-old-space-size=7168"
FORCE_COLOR: 3
CI_OS: ubuntu-latest
runs-on: ubuntu-latest
CI_OS: ubuntu-22.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.ref_name }}
ref: ${{ inputs.ref }}
repository: ${{ inputs.repository }}
token: ${{ secrets.GITHUB_TOKEN }}
persist-credentials: false
- name: Setup the toolchain
uses: LedgerHQ/ledger-live/tools/actions/composites/setup-toolchain@develop
Expand All @@ -84,17 +86,19 @@ jobs:
env:
NODE_OPTIONS: "--max-old-space-size=7168"
FORCE_COLOR: 3
CI_OS: ubuntu-latest
CI_OS: ubuntu-22.04
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
# DEBUG: "pw:browser*"
# DEBUG_LOGS: 1
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
outputs:
status: ${{ steps.tests.outcome }}
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.ref_name }}
ref: ${{ inputs.ref }}
repository: ${{ inputs.repository }}
token: ${{ secrets.GITHUB_TOKEN }}
persist-credentials: false
- name: Setup the toolchain
uses: LedgerHQ/ledger-live/tools/actions/composites/setup-toolchain@develop
Expand Down Expand Up @@ -147,12 +151,14 @@ jobs:

report:
needs: [codechecks, unit-tests, e2e-tests-linux]
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
if: ${{ !cancelled() && github.event_name == 'workflow_dispatch' }}
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.ref_name }}
ref: ${{ inputs.ref }}
repository: ${{ inputs.repository }}
token: ${{ secrets.GITHUB_TOKEN }}
persist-credentials: false
- name: "download linter results"
uses: actions/download-artifact@v4
Expand Down Expand Up @@ -318,22 +324,3 @@ jobs:
with:
name: summary.json
path: ${{ github.workspace }}/summary.json

allure-report:
name: "Allure Reports Export on Server"
needs: [e2e-tests-linux]
runs-on: [ledger-live-medium]
if: ${{ !cancelled() && github.ref_name == 'develop' }}
steps:
- name: checkout
uses: actions/checkout@v4
with:
ref: ${{ github.ref_name }}
- name: Send Results and Generate Allure Report - Linux
uses: LedgerHQ/ledger-live/tools/actions/composites/upload-allure-report@develop
if: ${{ !cancelled() }}
with:
platform: linux
login: ${{ vars.ALLURE_USERNAME }}
password: ${{ secrets.ALLURE_LEDGER_LIVE_PASSWORD }}
path: allure-results-linux
19 changes: 18 additions & 1 deletion .github/workflows/test-mobile-e2e-reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ on:
description: "[iOS] Test Execution ticket ID. Ex: 'B2CQA-2461'"
required: false
type: string
speculos_tests:
description: Run Speculos tests
required: false
type: boolean
default: false

# Uncomment to have log-level: trace on detox run and build
# (cf: apps/ledger-live-mobile/detox.config.js)
Expand Down Expand Up @@ -173,6 +178,8 @@ jobs:
AVD_CORES: 4
AVD_RAM_SIZE: 4096M
AVD_OPTIONS: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
SPECULOS_IMAGE_TAG: ghcr.io/ledgerhq/speculos:0.9.5
COINAPPS: ${{ github.workspace }}/coin-apps
outputs:
status: ${{ steps.detox.outcome }}
steps:
Expand Down Expand Up @@ -255,12 +262,22 @@ jobs:
disable-linux-hw-accel: false
emulator-options: ${{ env.AVD_OPTIONS }}
script: ./tools/scripts/wait_emulator_idle.sh
- name: Setup Speculos image and Coin Apps
if: ${{ inputs.speculos_tests }}
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: Run Android Tests
id: detox
run: pnpm mobile e2e:ci -p android -t
run: pnpm mobile e2e:ci -p android -t $([[ "$INPUT_SPECULOS" == "true" ]] && printf %s '--speculos')
timeout-minutes: 45
env:
DETOX_INSTALL_TIMEOUT: 120000
SEED: ${{ secrets.SEED_QAA_B2C }}
INPUT_SPECULOS: ${{ inputs.speculos_tests }}
- name: Generate single file Allure report
if: ${{ !cancelled() || steps.detox.outcome == 'cancelled' }}
run: pnpm dlx allure-commandline generate apps/ledger-live-mobile/artifacts --single-file
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/test-mobile-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ on:
description: "[iOS] Test Execution ticket ID. Ex: 'B2CQA-2461'"
required: false
type: string
speculos_tests:
description: Run Speculos tests
required: false
type: boolean
default: false

# Uncomment to have log-level: trace on detox run and build
# (cf: apps/ledger-live-mobile/detox.config.js)
Expand Down
6 changes: 0 additions & 6 deletions .github/workflows/test-mobile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,6 @@ name: "@Mobile • Test App"
run-name: "@Mobile • Test App triggered by ${{ inputs.login || github.actor }} ${{ format('on ref {0}', github.ref_name) }}"

on:
push:
branches:
- main
- develop
- release
- hotfix
workflow_dispatch:
inputs:
ref:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-ui-e2e-only-desktop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ jobs:
export COINAPPS=$PWD/coin-apps
export MOCK=0
if [ "${{ inputs.invert_filter }}" = true ]; then invert_filter="-invert"; fi
xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- pnpm desktop test:playwright:speculos ${INPUTS_TEST_FILTER:+--grep$invert_filter} "${{ inputs.test_filter }}" --shard=${{ matrix.shardIndex }}/${{ matrix.shardTotal }}
xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- pnpm desktop test:playwright:speculos --max-failures 50 ${INPUTS_TEST_FILTER:+--grep$invert_filter} "${{ inputs.test_filter }}" --shard=${{ matrix.shardIndex }}/${{ matrix.shardTotal }}
env:
INPUTS_TEST_FILTER: ${{ inputs.test_filter }}
SEED: ${{ secrets.SEED_QAA_B2C }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/turbo-affected-reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
core.exportVariable("head_branch", newHeadBranch);
core.exportVariable("base_branch", newBaseBranch);
- uses: ./tools/actions/turbo-affected
- uses: LedgerHQ/ledger-live/tools/actions/turbo-affected@develop
id: affected
with:
ref: ${{ format('origin/{0}', inputs.base_branch) }}
Loading

0 comments on commit b805741

Please sign in to comment.