From 3a5ff4ca322a0db120fa73a439bb1b204e456650 Mon Sep 17 00:00:00 2001 From: Josh McVey Date: Wed, 24 Jul 2024 17:21:48 -0500 Subject: [PATCH] re-order and remove HEAD --- .github/workflows/analyses-snapshot-test.yaml | 27 ++++++++++--------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/.github/workflows/analyses-snapshot-test.yaml b/.github/workflows/analyses-snapshot-test.yaml index 40838693dd6..dc70fdc7a07 100644 --- a/.github/workflows/analyses-snapshot-test.yaml +++ b/.github/workflows/analyses-snapshot-test.yaml @@ -49,6 +49,20 @@ jobs: with: ref: ${{ env.SNAPSHOT_REF }} + - name: Are my analyses snapshots in sync with the target branch? + if: ${{ env.PR_TARGET_BRANCH != 'not a pr' }} + run: | + git fetch origin ${{ env.PR_TARGET_BRANCH }} + git diff --quiet ${{ env.PR_TARGET_BRANCH }} -- analyses-snapshot-testing/tests/__snapshots__/analyses_snapshot_test + DIFF_EXIT_CODE=$? + if [ $DIFF_EXIT_CODE -eq 0 ]; then + echo "Analyses snapshots match ${{ env.PR_TARGET_BRANCH }} snapshots." + else + echo "Analyses snapshots do NOT match ${{ env.PR_TARGET_BRANCH }} snapshots." + echo "Is this becasue you have not pulled and merged ${{ env.PR_TARGET_BRANCH }}?" + echo "Or is this because you have already updated your snapshots and are all good 😊?" + fi + - name: Docker Build working-directory: analyses-snapshot-testing run: make build-opentrons-analysis @@ -69,19 +83,6 @@ jobs: working-directory: analyses-snapshot-testing run: make snapshot-test - - name: Are my analyses snapshots in sync with the target branch? - if: ${{ env.PR_TARGET_BRANCH != 'not a pr' }} - run: | - git fetch origin ${{ env.PR_TARGET_BRANCH }} - git diff --quiet HEAD ${{ env.PR_TARGET_BRANCH }} -- analyses-snapshot-testing/tests/__snapshots__/analyses_snapshot_test - DIFF_EXIT_CODE=$? - if [ $DIFF_EXIT_CODE -eq 0 ]; then - echo "Analyses snapshots match ${{ env.PR_TARGET_BRANCH }} snapshots." - else - echo "Analyses snapshots do NOT match ${{ env.PR_TARGET_BRANCH }} snapshots." - echo "Is this becasue you have not pulled and merged ${{ env.PR_TARGET_BRANCH }}?" - echo "Or is this because you have already updated your snapshots and are all good 😊?" - fi - name: Upload Report if: '!cancelled()' uses: actions/upload-artifact@v4