From 6e3a81096f0945167b4d8f417456efe9dfb71976 Mon Sep 17 00:00:00 2001 From: Garric Nahapetian Date: Tue, 30 Jan 2024 16:51:41 -0800 Subject: [PATCH] Validate recorded snapshots in Swift workflow (#311) * Add Superfluous Snapshots workflow * Prevent job from exiting on failure * Match existing workflows * Continue on error * Remove temp file * Move steps to existing workflow * Use multiline formatting Co-authored-by: Christopher Fuller * Add temp file * Revert "Add temp file" This reverts commit faf6cc9d603ebf269850b44836f0875aa8fe77a1. --------- Co-authored-by: Christopher Fuller --- .github/workflows/swift.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/swift.yml b/.github/workflows/swift.yml index 780c0cce..74b6917e 100644 --- a/.github/workflows/swift.yml +++ b/.github/workflows/swift.yml @@ -52,3 +52,14 @@ jobs: test-without-building -scheme "Layout" -destination "name=$SIMULATOR,OS=latest" + - name: Delete snapshots + run: make delete-snapshots + - name: Record snapshots + run: > + xcodebuild + test-without-building + -scheme "Layout" + -destination "name=$SIMULATOR,OS=latest" + continue-on-error: true + - name: Validate recorded snapshots + run: test -z "$(git status --porcelain)"