name: CI

on:
   push:
    branches:
      - ci

jobs:
  run-tests:
    runs-on: macos-latest
    strategy:
      matrix: 
        device_model: ['iPhone 8', 'Apple TV 4K']
    steps:
      - uses: actions/checkout@v2
      - uses: maxim-lobanov/setup-xcode@v1
        name: "Build for testing"
        with:
          xcode-version: '13.2.1'
      - uses: actions/cache@v1
        id: carthage-cache
        with:
          path: Carthage
          key: ${{ runner.os }}-carthage-${{ hashFiles('**/Cartfile.resolved') }}
      - name: Carthage
        if: steps.carthage-cache.outputs.cache-hit != 'true'
        run: |
          sh ./Consumption-Tests/Shared/carthage.sh bootstrap --cache-builds --use-xcframeworks
      - uses: futureware-tech/simulator-action@v1
        id: simulator
        with:
          model: ${{ matrix.device_model }}
      - name: "Run ${{ matrix.device_model }} Tests"
        run: |
          set -o pipefail && env NSUnbufferedIO=YES xcodebuild \
            -project PusherSwift.xcodeproj \
            -scheme PusherSwift \
            build \
            COMPILER_INDEX_STORE_ENABLE=NO \
            test \
            -destination "id=${{ steps.simulator.outputs.udid }}" \
            | xcpretty --color

name: CI

on:
   push:
    branches:
      - ci

jobs:
  run-tests:
    runs-on: macos-latest
    strategy:
      matrix: 
        os: ['tvOS', 'watchOS', 'iOS']
    steps:
      - uses: actions/checkout@v2
      - uses: maxim-lobanov/setup-xcode@v1
        with:
          xcode-version: '13.2.1'
      - uses: actions/cache@v1
        id: carthage-cache
        with:
          path: Carthage
          key: ${{ runner.os }}-carthage-${{ hashFiles('**/Cartfile.resolved') }}
      - name: Build
        if: steps.carthage-cache.outputs.cache-hit != 'true'
        run: |
          sh ./Consumption-Tests/Shared/carthage.sh bootstrap --cache-builds --use-xcframeworks
      - uses: futureware-tech/simulator-action@v1
        id: simulator
        with:
          os: ${{ matrix.os }}
      - name: "Run ${{ matrix.device_model }} Tests"
        run: |
          set -o pipefail && env NSUnbufferedIO=YES xcodebuild \
            -project PusherSwift.xcodeproj \
            -scheme PusherSwift \
            build \
            COMPILER_INDEX_STORE_ENABLE=NO \
            test \
            -destination "id=${{ steps.simulator.outputs.udid }}" \
            | xcpretty --color

Use OS instead of Device Model
Use OS instead of Device Model
