Run tests on different OS versions #43
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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-latest | |
timeout-minutes: 10 | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- platform: iOS | |
- platform: iOS | |
os-version: 12.0.0 | |
# - 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 | |
- name: Use Latest Stable Xcode | |
uses: maxim-lobanov/setup-xcode@v1 | |
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 Xcodes | |
shell: bash | |
run: | | |
brew install aria2 | |
brew tap robotsandpencils/made | |
brew install robotsandpencils/made/xcodes | |
- name: Install Simulator | |
shell: bash | |
run: sudo xcodes runtimes install --keep-archive '${{ matrix.platform }} ${{ matrix.os-version }}' | |
- name: Run Unit Tests | |
uses: bamx23/xcodebuild@os-version | |
with: | |
workspace: ".swiftpm/xcode/package.xcworkspace" | |
scheme: "KSCrash-Package" | |
platform: ${{ matrix.platform }} | |
os-version: "~${{ matrix.os-version }}" |