From 66b3ecd030067d94012b66e0f62e5e21530f3a30 Mon Sep 17 00:00:00 2001 From: Nikolay Volosatov Date: Thu, 9 May 2024 22:09:17 +0100 Subject: [PATCH] Run tests on different OS versions --- .github/workflows/cocoapods-lint.yml | 28 ++++++++++---------- .github/workflows/unit-tests.yml | 39 ++++++++++++++++++++++------ 2 files changed, 45 insertions(+), 22 deletions(-) diff --git a/.github/workflows/cocoapods-lint.yml b/.github/workflows/cocoapods-lint.yml index 9918e3723..20ce38cdd 100644 --- a/.github/workflows/cocoapods-lint.yml +++ b/.github/workflows/cocoapods-lint.yml @@ -17,20 +17,20 @@ jobs: include: - platform: iOS config: "" - - platform: iOS - config: "--use-libraries" - - platform: iOS - config: "--use-libraries --use-modular-headers" - - platform: iOS - config: "--use-static-frameworks" - - platform: macOS - config: "" - - platform: tvOS - config: "" - - platform: watchOS - config: "" - - platform: visionOS - config: "" + # - platform: iOS + # config: "--use-libraries" + # - platform: iOS + # config: "--use-libraries --use-modular-headers" + # - platform: iOS + # config: "--use-static-frameworks" + # - platform: macOS + # config: "" + # - platform: tvOS + # config: "" + # - platform: watchOS + # config: "" + # - platform: visionOS + # config: "" steps: - name: Checkout Code uses: actions/checkout@v4 diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index ed6da015b..049b94e69 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -14,13 +14,23 @@ jobs: strategy: fail-fast: false matrix: - platform: - - iOS - - macOS - - watchOS - - tvOS - - mac-catalyst - - visionOS + include: + - platform: iOS + - platform: iOS + os-version: 12.4 + # - platform: macOS + # - platform: macOS + # os-version: ~10.14.0 + # - platform: watchOS + # - platform: watchOS + # os-version: ~5.0.0 + # - platform: tvOS + # - platform: tvOS + # os-version: ~12.0.0 + # - platform: mac-catalyst + # - platform: mac-catalyst + # os-version: ~10.14.0 + # - platform: visionOS steps: - name: Checkout Code uses: actions/checkout@v4 @@ -30,9 +40,22 @@ jobs: with: xcode-version: latest-stable + - name: Cache + if: ${{ matrix.os-version }} + uses: actions/cache@v3 + with: + path: "~/Downloads" + key: ${{ runner.os }}-runtimes-downloads-${{ matrix.platform }}-${{ matrix.os-version }} + + - name: Install Simulator + if: ${{ matrix.os-version }} + shell: bash + run: sudo xcodes runtimes install --keep-archive '${{ matrix.platform }} ${{ matrix.os-version }}' + - name: Run Unit Tests - uses: bamx23/xcodebuild@vision-os + uses: bamx23/xcodebuild@os-version with: workspace: ".swiftpm/xcode/package.xcworkspace" scheme: "KSCrash-Package" platform: ${{ matrix.platform }} + os-version: "~${{ matrix.os-version }}"