Skip to content

Commit

Permalink
Update if
Browse files Browse the repository at this point in the history
  • Loading branch information
sidharthv96 committed Jan 19, 2024
1 parent 9b4279f commit ae8efa6
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,8 @@ jobs:
needs: e2e
runs-on: ubuntu-latest
if: ${{ always() }}
env:
E2EFailed: ${{ needs.e2e.result == 'failure' }}
steps:
- name: Download All Artifacts
uses: actions/download-artifact@v4
Expand All @@ -134,21 +136,21 @@ jobs:
!./**/__diff_output__/*
key: ${{ runner.os }}-snapshots-${{ github.event.after }}

- if: ${{ failure() }}
- if: ${{ env.E2EFailed }}
run: |
mkdir errors
cd snapshots
find . -mindepth 2 -type d -name "*__diff_output__*" -exec sh -c 'mv "$0"/*.png ../errors/' {} \;
- name: Upload Error snapshots
if: ${{ failure() }}
if: ${{ env.E2EFailed }}
uses: actions/upload-artifact@v4
id: upload-artifacts
with:
name: error-snapshots
retention-days: 10
path: errors/
- name: Notify Users
if: ${{ failure() }}
if: ${{ env.E2EFailed }}
run: |
echo "::error title=Visual tests failed::You can view images that failed by downloading the error-snapshots artifact: ${{ steps.upload-artifacts.outputs.artifact-url }}"

0 comments on commit ae8efa6

Please sign in to comment.