From 6c2fce5a11af4de58da2b93969ade1829d6d162e Mon Sep 17 00:00:00 2001 From: Abdurrahman SASTIM Date: Tue, 14 Jan 2025 07:14:35 +0100 Subject: [PATCH 1/3] ci: pass schedule_cron as input to set-broadcast action --- .github/workflows/test-mobile-e2e-reusable.yml | 1 + .github/workflows/test-ui-e2e-only-desktop.yml | 1 + tools/actions/composites/setup-e2e-broadcast/action.yml | 6 +++++- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-mobile-e2e-reusable.yml b/.github/workflows/test-mobile-e2e-reusable.yml index 11ca15f5594..dc3b9f5c133 100644 --- a/.github/workflows/test-mobile-e2e-reusable.yml +++ b/.github/workflows/test-mobile-e2e-reusable.yml @@ -313,6 +313,7 @@ jobs: uses: LedgerHQ/ledger-live/tools/actions/composites/setup-e2e-broadcast@develop with: enable_broadcast: ${{ inputs.enable_broadcast }} + schedule_cron: ${{ github.event.schedule.cron }} - name: Run Android Tests id: detox run: pnpm mobile e2e:ci -p android -t $([[ "$INPUT_SPECULOS" == "true" ]] && printf %s '--speculos') --shard ${{ matrix.shardIndex }}/${{ matrix.shardTotal }} diff --git a/.github/workflows/test-ui-e2e-only-desktop.yml b/.github/workflows/test-ui-e2e-only-desktop.yml index 6795842ae27..83264bf6f5f 100644 --- a/.github/workflows/test-ui-e2e-only-desktop.yml +++ b/.github/workflows/test-ui-e2e-only-desktop.yml @@ -122,6 +122,7 @@ jobs: uses: LedgerHQ/ledger-live/tools/actions/composites/setup-e2e-broadcast@develop with: enable_broadcast: ${{ inputs.enable_broadcast }} + schedule_cron: ${{ github.event.schedule.cron }} - name: Run playwright tests [Linux => xvfb-run] id: tests diff --git a/tools/actions/composites/setup-e2e-broadcast/action.yml b/tools/actions/composites/setup-e2e-broadcast/action.yml index db5de66f14e..251f1750a09 100644 --- a/tools/actions/composites/setup-e2e-broadcast/action.yml +++ b/tools/actions/composites/setup-e2e-broadcast/action.yml @@ -5,6 +5,10 @@ inputs: description: "Enable transaction broadcast" required: false default: "false" + schedule_cron: + description: "Cron expression for scheduled runs" + required: false + default: "" runs: using: composite @@ -13,7 +17,7 @@ runs: id: set-broadcast shell: bash run: | - if [[ "${{ inputs.enable_broadcast }}" == "true" || ( "${{ github.event_name }}" == "schedule" && "${{ github.event.schedule.cron }}" == "0 5 * * 1" ) ]]; then + if [[ "${{ inputs.enable_broadcast }}" == "true" || ( "${{ github.event_name }}" == "schedule" && "${{ inputs.schedule_cron }}" == "0 5 * * 1" ) ]]; then echo "DISABLE_TRANSACTION_BROADCAST=0" >> $GITHUB_ENV else echo "DISABLE_TRANSACTION_BROADCAST=1" >> $GITHUB_ENV From f3958b5202ff44cbb416a1ae6a04e6f772a67c5d Mon Sep 17 00:00:00 2001 From: Abdurrahman SASTIM Date: Tue, 14 Jan 2025 07:33:28 +0100 Subject: [PATCH 2/3] ci: test action modification --- .github/workflows/test-mobile-e2e-reusable.yml | 2 +- .github/workflows/test-ui-e2e-only-desktop.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-mobile-e2e-reusable.yml b/.github/workflows/test-mobile-e2e-reusable.yml index dc3b9f5c133..19105d510ea 100644 --- a/.github/workflows/test-mobile-e2e-reusable.yml +++ b/.github/workflows/test-mobile-e2e-reusable.yml @@ -310,7 +310,7 @@ jobs: bot_key: ${{ secrets.GH_BOT_PRIVATE_KEY }} - name: Set DISABLE_TRANSACTION_BROADCAST if: ${{ env.SPECULOS_RUN == 'true' }} - uses: LedgerHQ/ledger-live/tools/actions/composites/setup-e2e-broadcast@develop + uses: LedgerHQ/ledger-live/tools/actions/composites/setup-e2e-broadcast@support/qaa_429_fix_speculos_broadcast with: enable_broadcast: ${{ inputs.enable_broadcast }} schedule_cron: ${{ github.event.schedule.cron }} diff --git a/.github/workflows/test-ui-e2e-only-desktop.yml b/.github/workflows/test-ui-e2e-only-desktop.yml index 83264bf6f5f..d2265bc0ef5 100644 --- a/.github/workflows/test-ui-e2e-only-desktop.yml +++ b/.github/workflows/test-ui-e2e-only-desktop.yml @@ -119,7 +119,7 @@ jobs: shell: bash - name: Set DISABLE_TRANSACTION_BROADCAST - uses: LedgerHQ/ledger-live/tools/actions/composites/setup-e2e-broadcast@develop + uses: LedgerHQ/ledger-live/tools/actions/composites/setup-e2e-broadcast@support/qaa_429_fix_speculos_broadcast with: enable_broadcast: ${{ inputs.enable_broadcast }} schedule_cron: ${{ github.event.schedule.cron }} From 083fb26156fd3f341a3b8d2277f1a6e9e66dbb54 Mon Sep 17 00:00:00 2001 From: Abdurrahman SASTIM Date: Tue, 14 Jan 2025 07:50:10 +0100 Subject: [PATCH 3/3] Revert "ci: test action modification" This reverts commit f3958b5202ff44cbb416a1ae6a04e6f772a67c5d. --- .github/workflows/test-mobile-e2e-reusable.yml | 2 +- .github/workflows/test-ui-e2e-only-desktop.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-mobile-e2e-reusable.yml b/.github/workflows/test-mobile-e2e-reusable.yml index 19105d510ea..dc3b9f5c133 100644 --- a/.github/workflows/test-mobile-e2e-reusable.yml +++ b/.github/workflows/test-mobile-e2e-reusable.yml @@ -310,7 +310,7 @@ jobs: bot_key: ${{ secrets.GH_BOT_PRIVATE_KEY }} - name: Set DISABLE_TRANSACTION_BROADCAST if: ${{ env.SPECULOS_RUN == 'true' }} - uses: LedgerHQ/ledger-live/tools/actions/composites/setup-e2e-broadcast@support/qaa_429_fix_speculos_broadcast + uses: LedgerHQ/ledger-live/tools/actions/composites/setup-e2e-broadcast@develop with: enable_broadcast: ${{ inputs.enable_broadcast }} schedule_cron: ${{ github.event.schedule.cron }} diff --git a/.github/workflows/test-ui-e2e-only-desktop.yml b/.github/workflows/test-ui-e2e-only-desktop.yml index d2265bc0ef5..83264bf6f5f 100644 --- a/.github/workflows/test-ui-e2e-only-desktop.yml +++ b/.github/workflows/test-ui-e2e-only-desktop.yml @@ -119,7 +119,7 @@ jobs: shell: bash - name: Set DISABLE_TRANSACTION_BROADCAST - uses: LedgerHQ/ledger-live/tools/actions/composites/setup-e2e-broadcast@support/qaa_429_fix_speculos_broadcast + uses: LedgerHQ/ledger-live/tools/actions/composites/setup-e2e-broadcast@develop with: enable_broadcast: ${{ inputs.enable_broadcast }} schedule_cron: ${{ github.event.schedule.cron }}