Skip to content

Run tests on different OS versions #44

Run tests on different OS versions

Run tests on different OS versions #44

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-latest
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
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
- name: Use Latest Stable Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
- name: Cache
if: matrix.os-version !== undefined

Check failure on line 44 in .github/workflows/unit-tests.yml

View workflow run for this annotation

GitHub Actions / Run Unit Tests

Invalid workflow file

The workflow is not valid. .github/workflows/unit-tests.yml (Line: 44, Col: 13): Unexpected symbol: '='. Located at position 21 within expression: matrix.os-version !== undefined .github/workflows/unit-tests.yml (Line: 51, Col: 13): Unexpected symbol: '='. Located at position 21 within expression: matrix.os-version !== undefined
uses: actions/cache@v3
with:
path: "~/Downloads"
key: ${{ runner.os }}-runtimes-downloads-${{ matrix.platform }}-${{ matrix.os-version }}
- name: Install Simulator
if: matrix.os-version !== undefined
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 }}"