From 499f7f730cf377d6b1942bc9cdd9c51c8649b58d Mon Sep 17 00:00:00 2001 From: Josh McVey Date: Mon, 18 Dec 2023 18:40:46 -0600 Subject: [PATCH] test(app-testing): PR on failure --- .github/workflows/analyses-snapshot-test.yaml | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/.github/workflows/analyses-snapshot-test.yaml b/.github/workflows/analyses-snapshot-test.yaml index df8b39e89c3..90e907aa536 100644 --- a/.github/workflows/analyses-snapshot-test.yaml +++ b/.github/workflows/analyses-snapshot-test.yaml @@ -46,6 +46,7 @@ jobs: run: make setup - name: Run Test + id: run_test working-directory: app-testing run: make snapshot-test @@ -54,4 +55,20 @@ jobs: uses: actions/upload-artifact@v4 with: name: test-report - path: app-testing/results/ \ No newline at end of file + path: app-testing/results/ + + - name: Handle Test Failure + if: steps.run_test.outcome == 'failure' + working-directory: app-testing + run: make snapshot-test-update + + - name: Create Snapshot update Request + if: steps.run_test.outcome == 'failure' + uses: peter-evans/create-pull-request@v5 + with: + commit-message: 'fix(app-testing): snapshot failure capture' + title: 'Evaluate Analyses Snapshot Update ${{ env.TARGET }}' + body: 'This PR is an automated snapshot update request. Please review the changes and merge if they are acceptable or find you bug and fix it.' + branch: 'app-testing/${{ env.TARGET }}-from-${{ env.TEST_SOURCE}}' + base: ${{ env.TARGET }} +