From a0d647a99defcf3ca6ee78b848d2049ac7096c83 Mon Sep 17 00:00:00 2001 From: Jamie <2119834+jamieQ@users.noreply.github.com> Date: Wed, 7 Oct 2026 13:08:25 -0500 Subject: [PATCH] ci: Run package unit tests on an iOS simulator --- .github/workflows/unit-tests.yml | 43 ++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/unit-tests.yml diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml new file mode 100644 index 00000000..f114e3c8 --- /dev/null +++ b/.github/workflows/unit-tests.yml @@ -0,0 +1,43 @@ +name: Unit Tests + +on: + push: + branches: [main] + pull_request: + branches: [main] + +permissions: + contents: read + +jobs: + test-ios: + name: iOS unit tests + runs-on: macos-latest + timeout-minutes: 30 + + steps: + - name: Checkout + uses: actions/checkout@v6 + + - name: Log test environment + run: | + xcodebuild -version + xcrun --sdk iphonesimulator --show-sdk-version + xcrun simctl list runtimes + + - name: Run package tests + run: | + xcodebuild test \ + -scheme SnapshotPreviews-Package \ + -destination 'platform=iOS Simulator,name=iPhone 17 Pro Max' \ + -resultBundlePath UnitTests.xcresult \ + CODE_SIGNING_ALLOWED=NO + + - name: Upload test results + if: always() + uses: actions/upload-artifact@v7 + with: + name: ios-unit-test-results + path: UnitTests.xcresult + if-no-files-found: ignore + retention-days: 7