Initial commit #151
This file contains hidden or 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: Test | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.ref_name }} | |
| cancel-in-progress: true | |
| jobs: | |
| get-environment-details: | |
| strategy: | |
| matrix: | |
| include: | |
| - os: macos-15 | |
| xcode: '16.0' | |
| name: Get Environment Details (Xcode ${{ matrix.xcode }}) | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Select Xcode | |
| run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app | |
| - name: Print OS SDKs | |
| run: xcodebuild -version -sdk | |
| - name: Print simulators | |
| run: | | |
| xcrun simctl delete unavailable | |
| xcrun simctl list | |
| test: | |
| needs: get-environment-details | |
| strategy: | |
| matrix: | |
| include: | |
| - os: macos-15 | |
| xcode: '16.0' | |
| platform: iOS | |
| destination: "name=iPhone 16 Pro" | |
| sdk: iphonesimulator | |
| - os: macos-15 | |
| xcode: '16.0' | |
| platform: tvOS | |
| destination: "name=Apple TV 4K (3rd generation)" | |
| sdk: appletvsimulator | |
| - os: macos-15 | |
| xcode: '16.0' | |
| platform: visionOS | |
| destination: "name=Apple Vision Pro" | |
| sdk: xrsimulator | |
| - os: macos-15 | |
| xcode: '16.0' | |
| platform: watchOS | |
| destination: "name=Apple Watch Ultra 2 (49mm)" | |
| sdk: watchsimulator | |
| - os: macos-15 | |
| xcode: '16.0' | |
| platform: macOS | |
| name: Test ${{ matrix.platform }} (Xcode ${{ matrix.xcode }}) | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Checkout project | |
| uses: actions/checkout@master | |
| - name: Select Xcode | |
| run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app | |
| - name: Run tests (Xcode) | |
| if: matrix.platform != 'macOS' | |
| run: | | |
| set -o pipefail | |
| xcodebuild clean test -scheme PersistentKeyValueKit -sdk ${{ matrix.sdk }} -destination "${{ matrix.destination }}" -configuration Debug -enableCodeCoverage YES | xcpretty -c | |
| - name: Run tests (Swift) | |
| if: matrix.platform == 'macOS' | |
| run: swift test |