From 05e4de64b636078ba3c605d97fe568f17155270e Mon Sep 17 00:00:00 2001 From: Francois Beutin Date: Thu, 5 Sep 2024 10:58:08 +0200 Subject: [PATCH] wip --- .../reusable_regenerate_snapshots.yml | 25 +++++++++++++++++++ .../reusable_swap_functional_tests.yml | 6 +++++ 2 files changed, 31 insertions(+) create mode 100644 .github/workflows/reusable_regenerate_snapshots.yml diff --git a/.github/workflows/reusable_regenerate_snapshots.yml b/.github/workflows/reusable_regenerate_snapshots.yml new file mode 100644 index 00000000..71a32265 --- /dev/null +++ b/.github/workflows/reusable_regenerate_snapshots.yml @@ -0,0 +1,25 @@ +--- +name: Regenerate and commit snapshots + +on: + workflow_dispatch: + +jobs: + delete_snapshots: + name: Delete current snapshots + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Delete snapshots + run: | + rm -rf ./test/python/snapshots + + regenerate_snapshots: + name: Run ragger with golden run + needs: delete_snapshots + uses: ./.github/workflows/reusable_swap_functional_tests.yml + with: + branch_for_exchange: ${{ github.ref }} + regenerate_snapshots: true diff --git a/.github/workflows/reusable_swap_functional_tests.yml b/.github/workflows/reusable_swap_functional_tests.yml index 2b03df87..d5ec8fe7 100644 --- a/.github/workflows/reusable_swap_functional_tests.yml +++ b/.github/workflows/reusable_swap_functional_tests.yml @@ -98,6 +98,11 @@ on: default: '""' type: string + regenerate_snapshots: + required: false + default: false + type: boolean + jobs: build_sideloaded_applications: name: Build libraries @@ -184,3 +189,4 @@ jobs: download_app_binaries_artifact: exchange_binaries lib_binaries_artifact: libraries_binaries test_filter: ${{ inputs.test_filter }} + test_options: ${{ inputs.regenerate_snapshots == 'true' && '--golden_run' || '' }}