From ae5a2e0d456580da6a6a1c1265643a1f77773fcd Mon Sep 17 00:00:00 2001 From: Garric Nahapetian Date: Mon, 29 Jan 2024 19:09:39 -0800 Subject: [PATCH] Move steps to existing workflow --- .github/workflows/superfluous-snapshots.yml | 41 --------------------- .github/workflows/swift.yml | 7 ++++ 2 files changed, 7 insertions(+), 41 deletions(-) delete mode 100644 .github/workflows/superfluous-snapshots.yml diff --git a/.github/workflows/superfluous-snapshots.yml b/.github/workflows/superfluous-snapshots.yml deleted file mode 100644 index c56a7525..00000000 --- a/.github/workflows/superfluous-snapshots.yml +++ /dev/null @@ -1,41 +0,0 @@ -name: Superfluous Snapshots - -on: - push: - branches: [ main ] - pull_request: - branches: [ main ] - -env: - DEVELOPER_DIR: /Applications/Xcode_15.0.app/Contents/Developer - SWIFT_STRICT_CONCURRENCY: complete - -jobs: - swift: - name: Superfluous Snapshots - runs-on: macos-13 - env: - SIMULATOR: iPhone 14 - steps: - - name: Checkout source - uses: actions/checkout@v3 - - name: Delete snapshots - run: make delete-snapshots - - name: Resolve swift package - run: swift package resolve - - name: Resolve package dependencies - run: xcodebuild -resolvePackageDependencies - - name: Build - run: xcodebuild build-for-testing -scheme "Layout" -destination "name=$SIMULATOR,OS=latest" - - name: Test - continue-on-error: true - run: xcodebuild test-without-building -scheme "Layout" -destination "name=$SIMULATOR,OS=latest" - - name: Detect superfluous snapshots - run: | - if [ -z "$(git status --porcelain)" ] - then - echo "No superfluous snapshots detected." - else - echo "Superfluous snapshots detected." - exit 1 - fi diff --git a/.github/workflows/swift.yml b/.github/workflows/swift.yml index 780c0cce..e02b5b19 100644 --- a/.github/workflows/swift.yml +++ b/.github/workflows/swift.yml @@ -52,3 +52,10 @@ 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)"