|
| 1 | +name: Build and run functional tests using ragger entry point |
| 2 | + |
| 3 | +# This workflow will build the app and then run functional tests using the Ragger framework upon Speculos emulation. |
| 4 | +# It calls a reusable workflow developed by Ledger's internal developer team to build the application and upload the |
| 5 | +# resulting binaries. |
| 6 | +# It then calls another reusable workflow to run the Ragger tests on the compiled application binary. |
| 7 | +# |
| 8 | +# This workflow is itself written as a reusable workflow so it can be triggered by itself (file |
| 9 | +# build_and_functional_tests.yml), or triggered by external repositories CI (used by various non regression workflows |
| 10 | +# we have). You do not need to keep this split, so you can merge this file and build_and_functional_tests.yml on your |
| 11 | +# fork |
| 12 | + |
| 13 | +on: |
| 14 | + workflow_call: |
| 15 | + inputs: |
| 16 | + branch: |
| 17 | + required: false |
| 18 | + default: 'main' |
| 19 | + type: string |
| 20 | + |
| 21 | + test_filter: |
| 22 | + required: false |
| 23 | + default: '""' |
| 24 | + type: string |
| 25 | + |
| 26 | + regenerate_snapshots: |
| 27 | + description: 'Clean snapshots, regenerate them, commit the changes in a branch, and open a PR' |
| 28 | + required: false |
| 29 | + default: false |
| 30 | + type: boolean |
| 31 | + |
| 32 | +jobs: |
| 33 | + build_application: |
| 34 | + name: Build application using the reusable workflow |
| 35 | + uses: LedgerHQ/ledger-app-workflows/.github/workflows/reusable_build.yml@v1 |
| 36 | + with: |
| 37 | + app_repository: LedgerHQ/app-boilerplate-rust |
| 38 | + app_branch_name: ${{ inputs.branch }} |
| 39 | + upload_app_binaries_artifact: "compiled_app_binaries" |
| 40 | + builder: ledger-app-builder |
| 41 | + |
| 42 | + ragger_tests: |
| 43 | + name: Run ragger tests using the reusable workflow |
| 44 | + needs: build_application |
| 45 | + uses: LedgerHQ/ledger-app-workflows/.github/workflows/reusable_ragger_tests.yml@v1 |
| 46 | + with: |
| 47 | + app_repository: LedgerHQ/app-boilerplate-rust |
| 48 | + app_branch_name: ${{ inputs.branch }} |
| 49 | + download_app_binaries_artifact: "compiled_app_binaries" |
| 50 | + test_filter: ${{ inputs.test_filter }} |
| 51 | + regenerate_snapshots: ${{ inputs.regenerate_snapshots }} |
0 commit comments