From 4dc9572e3f2866c714035d2ffc6ab1cfc5d9a0e2 Mon Sep 17 00:00:00 2001 From: GroM Date: Mon, 13 Oct 2025 15:25:28 +0200 Subject: [PATCH 1/2] swap tests in separate workflow --- .../workflows/build_and_functional_tests.yml | 10 +--- .github/workflows/swap_tests.yml | 46 +++++++++++++++++++ 2 files changed, 47 insertions(+), 9 deletions(-) create mode 100644 .github/workflows/swap_tests.yml diff --git a/.github/workflows/build_and_functional_tests.yml b/.github/workflows/build_and_functional_tests.yml index 1a38ffe4c..bfd938242 100644 --- a/.github/workflows/build_and_functional_tests.yml +++ b/.github/workflows/build_and_functional_tests.yml @@ -41,12 +41,4 @@ jobs: with: download_app_binaries_artifact: "app_boilerplate_binaries" regenerate_snapshots: ${{ github.event_name == 'workflow_dispatch' && inputs.golden_run == 'Open a PR' }} - test_dir: "tests/standalone" - - tests_swap: - name: Run swap tests using the reusable workflow - needs: build_application - uses: LedgerHQ/ledger-app-workflows/.github/workflows/reusable_swap_tests.yml@v1 - with: - download_app_binaries_artifact: "app_boilerplate_binaries" - regenerate_snapshots: ${{ github.event_name == 'workflow_dispatch' && inputs.golden_run == 'Open a PR' }} \ No newline at end of file + test_dir: "tests/standalone" \ No newline at end of file diff --git a/.github/workflows/swap_tests.yml b/.github/workflows/swap_tests.yml new file mode 100644 index 000000000..43e763fa5 --- /dev/null +++ b/.github/workflows/swap_tests.yml @@ -0,0 +1,46 @@ +name: Build and run functional tests using ragger through reusable workflow + +# This workflow will build the app and then run functional tests using the Ragger framework upon Speculos emulation. +# It calls a reusable workflow developed by Ledger's internal developer team to build the application and upload the +# resulting binaries. +# It then calls another reusable workflow to run the Ragger tests on the compiled application binary. +# +# The build part of this workflow is mandatory, this ensures that the app will be deployable in the Ledger App Store. +# While the test part of this workflow is optional, having functional testing on your application is mandatory and this workflow and +# tooling environment is meant to be easy to use and adapt after forking your application + +on: + workflow_dispatch: + inputs: + golden_run: + type: choice + required: true + default: 'Raise an error (default)' + description: CI behavior if the test snapshots are different than expected. + options: + - 'Raise an error (default)' + - 'Open a PR' + push: + branches: + - master + - main + - develop + pull_request: + repository_dispatch: + types: [trigger-workflow] + +jobs: + build_application: + name: Build application using the reusable workflow + uses: LedgerHQ/ledger-app-workflows/.github/workflows/reusable_build.yml@v1 + with: + upload_app_binaries_artifact: "app_boilerplate_binaries" + + tests_swap: + name: Run swap tests using the reusable workflow + needs: build_application + uses: LedgerHQ/ledger-app-workflows/.github/workflows/reusable_swap_tests.yml@y333/swap_dir_as_input + with: + download_app_binaries_artifact: "app_boilerplate_binaries" + regenerate_snapshots: ${{ github.event_name == 'workflow_dispatch' && inputs.golden_run == 'Open a PR' }} + swap_test_dir: "tests/swap" \ No newline at end of file From 8b6a2b7b80c672a6bf935b109255f4673e042e1b Mon Sep 17 00:00:00 2001 From: GroM Date: Mon, 13 Oct 2025 15:29:26 +0200 Subject: [PATCH 2/2] rename swap workflow --- .github/workflows/swap_tests.yml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/workflows/swap_tests.yml b/.github/workflows/swap_tests.yml index 43e763fa5..867c458d6 100644 --- a/.github/workflows/swap_tests.yml +++ b/.github/workflows/swap_tests.yml @@ -1,14 +1,10 @@ -name: Build and run functional tests using ragger through reusable workflow +name: Build and run swap tests using ragger through reusable workflow -# This workflow will build the app and then run functional tests using the Ragger framework upon Speculos emulation. +# This workflow will build the app and then run swap tests using the Ragger framework upon Speculos emulation. # It calls a reusable workflow developed by Ledger's internal developer team to build the application and upload the # resulting binaries. # It then calls another reusable workflow to run the Ragger tests on the compiled application binary. # -# The build part of this workflow is mandatory, this ensures that the app will be deployable in the Ledger App Store. -# While the test part of this workflow is optional, having functional testing on your application is mandatory and this workflow and -# tooling environment is meant to be easy to use and adapt after forking your application - on: workflow_dispatch: inputs: