-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Split build and test CI entry point from workflow to provide a reusab…
…le interface
- Loading branch information
1 parent
24bcdae
commit e29a4f8
Showing
2 changed files
with
64 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
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. | ||
# | ||
# While 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_call: | ||
inputs: | ||
branch_for_bitcoin: | ||
required: false | ||
default: 'develop' | ||
type: string | ||
|
||
test_filter: | ||
required: false | ||
default: '""' | ||
type: string | ||
|
||
regenerate_snapshots: | ||
description: 'Clean snapshots, regenerate them, commit the changes in a branch, and open a PR' | ||
required: false | ||
default: false | ||
type: boolean | ||
|
||
jobs: | ||
build_application: | ||
name: Build application using the reusable workflow | ||
uses: LedgerHQ/ledger-app-workflows/.github/workflows/reusable_build.yml@v1 | ||
with: | ||
app_repository: LedgerHQ/app-bitcoin-new | ||
app_branch_name: ${{ inputs.branch_for_bitcoin }} | ||
upload_app_binaries_artifact: "compiled_app_binaries" | ||
flags: "DEBUG=0 COIN=bitcoin_testnet" | ||
|
||
ragger_tests: | ||
name: Run ragger tests using the reusable workflow | ||
needs: build_application | ||
uses: LedgerHQ/ledger-app-workflows/.github/workflows/reusable_ragger_tests.yml@v1 | ||
with: | ||
app_repository: LedgerHQ/app-bitcoin-new | ||
app_branch_name: ${{ inputs.branch_for_bitcoin }} | ||
test_filter: ${{ inputs.test_filter }} | ||
download_app_binaries_artifact: "compiled_app_binaries" | ||
container_image: "ghcr.io/ledgerhq/app-bitcoin-new/speculos-bitcoin-musig2:latest" | ||
regenerate_snapshots: ${{ inputs.regenerate_snapshots }} |