From d596099a5442cef1683d00f966fe9920549093af Mon Sep 17 00:00:00 2001 From: Jakub Olejnik Date: Thu, 2 Nov 2023 22:02:00 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20Upload=20result=20bundle=20for?= =?UTF-8?q?=20failed=20tests?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/tests.yml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 342f389e..bef3f0a7 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -10,6 +10,18 @@ jobs: - uses: actions/checkout@v4.1.1 - uses: AckeeCZ/load-xcode-version@1.1.0 - name: Run iOS tests - run: set -o pipefail && xcodebuild test -scheme ACKategories-iOS -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 15 Pro Max,OS=latest' ONLY_ACTIVE_ARCH=YES | xcpretty + env: + DEVICE: iPhone 15 Pro Max + run: | + xcrun simctl boot "$DEVICE" + set -o pipefail && xcodebuild test -scheme ACKategories-iOS -resultBundlePath Tests-iOS.xcresult -sdk iphonesimulator -destination "platform=iOS Simulator,name=$DEVICE,OS=latest" ONLY_ACTIVE_ARCH=YES | xcpretty + - uses: actions/upload-artifact@v3 + if: failure() + with: + path: Tests-iOS.xcresult - name: Run macOS tests - run: set -o pipefail && xcodebuild test -scheme ACKategoriesCore -destination 'platform=OS X,arch=x86_64' | xcpretty \ No newline at end of file + run: set -o pipefail && xcodebuild test -scheme ACKategoriesCore -resultBundlePath Tests-macOS.xcresult -destination 'platform=OS X,arch=x86_64' | xcpretty + - uses: actions/upload-artifact@v3 + if: failure() + with: + path: Tests-macOS.xcresult \ No newline at end of file