From 78fa25d7b5e420d1b4cef345d675148172ab1f33 Mon Sep 17 00:00:00 2001 From: Francois Beutin Date: Fri, 6 Sep 2024 16:23:53 +0200 Subject: [PATCH] Add an option for opening PRs with golden run result in CI --- .github/workflows/build_and_functional_tests.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_and_functional_tests.yml b/.github/workflows/build_and_functional_tests.yml index c92fc216e..55c07b59d 100644 --- a/.github/workflows/build_and_functional_tests.yml +++ b/.github/workflows/build_and_functional_tests.yml @@ -10,6 +10,15 @@ name: Build and run functional tests using ragger through reusable workflow on: workflow_dispatch: + inputs: + golden_run: + type: choice + required: true + default: 'Raise an error (default)' + description: CI behavior if the test snaphots are different than expected. + options: + - 'Raise an error (default)' + - 'Open a PR' push: branches: - master @@ -27,6 +36,7 @@ jobs: 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 + uses: LedgerHQ/ledger-app-workflows/.github/workflows/reusable_ragger_tests.yml@fbe/regenerate_snapshots with: download_app_binaries_artifact: "compiled_app_binaries" + regenerate_snapshots: ${{ inputs.golden_run == 'Open a PR' }}