Skip to content

Run tests on different OS versions #58

Run tests on different OS versions

Run tests on different OS versions #58

Workflow file for this run

name: Run Unit Tests
on:
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
unit-tests:
runs-on: "macos-${{ matrix.macos-version || 'latest' }}"
strategy:
fail-fast: false
matrix:
include:
- platform: iOS
- platform: iOS
os-version: ~12.4.0
runtime: "12.4"
macos-version: "12"
xcode-version: "13.4.1"
- platform: watchOS
- platform: watchOS
os-version: ~6.2.0
macos-version: "11"
xcode-version: "11.7"
- platform: tvOS
- platform: tvOS
os-version: ~12.4.0
runtime: "12.4"
macos-version: "12"
xcode-version: "13.4.1"
- platform: visionOS
- platform: macOS
- platform: macOS
macos-version: "11"
- platform: mac-catalyst
- platform: mac-catalyst
macos-version: "11"
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Use Latest Stable Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: ${{ matrix.xcode-version || 'latest-stable' }}
- name: Cache
if: ${{ matrix.runtime }}
uses: actions/cache@v3
with:
path: "~/Downloads"
key: ${{ runner.os }}-runtimes-downloads-${{ matrix.platform }}-${{ matrix.runtime }}
- name: Install Simulator
if: ${{ matrix.runtime }}
shell: bash
timeout-minutes: 30
run: sudo xcodes runtimes install --keep-archive '${{ matrix.platform }} ${{ matrix.runtime }}'
- name: Run Unit Tests
uses: bamx23/xcodebuild@os-version
timeout-minutes: 10
with:
workspace: ".swiftpm/xcode/package.xcworkspace"
scheme: "KSCrash-Package"
platform: ${{ matrix.platform }}
os-version: ${{ matrix.os-version }}