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..867c458d6 --- /dev/null +++ b/.github/workflows/swap_tests.yml @@ -0,0 +1,42 @@ +name: Build and run swap tests using ragger through reusable workflow + +# 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. +# +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