diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 436f76ae..4b112409 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,8 +19,14 @@ jobs: name: Test Library (Darwin) steps: - uses: actions/checkout@v3 + with: + fetch-depth: 0 - name: Select Xcode 15.2 run: sudo xcode-select -s /Applications/Xcode_15.2.app + - uses: actions/cache@v3 + with: + path: /tmp/derived-data + key: derived-data-cache- - name: Run tests run: make test-library diff --git a/Makefile b/Makefile index 5de0d964..ef4e9e2f 100644 --- a/Makefile +++ b/Makefile @@ -3,17 +3,18 @@ PLATFORM_MACOS = macOS PLATFORM_MAC_CATALYST = macOS,variant=Mac Catalyst PLATFORM_TVOS = tvOS Simulator,name=Apple TV PLATFORM_WATCHOS = watchOS Simulator,name=Apple Watch Series 9 (41mm) -EXAMPLE = Examples test-all: test-library test-linux test-library: for platform in "$(PLATFORM_IOS)" "$(PLATFORM_MACOS)" "$(PLATFORM_MAC_CATALYST)" "$(PLATFORM_TVOS)" "$(PLATFORM_WATCHOS)"; do \ - xcodebuild test \ - -skipMacroValidation \ - -workspace supabase-swift.xcworkspace \ - -scheme Supabase \ - -destination platform="$$platform" || exit 1; \ + set -o pipefail && \ + xcodebuild test \ + -skipMacroValidation \ + -workspace supabase-swift.xcworkspace \ + -scheme Supabase \ + -derivedDataPath /tmp/derived-data \ + -destination platform="$$platform" | xcpretty; \ done; test-linux: @@ -43,11 +44,12 @@ test-docs: build-examples: for scheme in Examples UserManagement SlackClone; do \ - xcodebuild build \ - -skipMacroValidation \ - -workspace supabase-swift.xcworkspace \ - -scheme "$$scheme" \ - -destination platform="$(PLATFORM_IOS)" || exit 1; \ + set -o pipefail && \ + xcodebuild build \ + -skipMacroValidation \ + -workspace supabase-swift.xcworkspace \ + -scheme "$$scheme" \ + -destination platform="$(PLATFORM_IOS)" | xcpretty; \ done format: