|
7 | 7 | pull_request: |
8 | 8 |
|
9 | 9 | env: |
10 | | - XCODE_VERSION: 15.1 |
11 | | - IOS_DESTINATION: platform=iOS Simulator,OS=17.2,name=iPad (10th generation) |
| 10 | + XCODE_VERSION: 16.1.0 |
12 | 11 | TUIST_TEST_DEVICE: iPad (10th generation) |
13 | 12 | TUIST_TEST_PLATFORM: iOS |
14 | | - TUIST_TEST_OS: 17.2 |
15 | 13 |
|
16 | 14 | jobs: |
17 | 15 | development-tests: |
18 | 16 | runs-on: macos-latest |
19 | 17 |
|
| 18 | + name: "development-tests [iOS ${{ matrix.sdk }}]" |
| 19 | + |
| 20 | + env: |
| 21 | + TUIST_TEST_SCHEME: UnitTests |
| 22 | + |
20 | 23 | strategy: |
| 24 | + fail-fast: false |
21 | 25 | matrix: |
22 | | - scheme: |
23 | | - - UnitTests |
24 | | - - SnapshotTests |
| 26 | + include: |
| 27 | + - sdk: "16.4" |
| 28 | + simctl_runtime: "com.apple.CoreSimulator.SimRuntime.iOS-16-4" |
| 29 | + installation_required: true |
| 30 | + |
| 31 | + - sdk: "17.5" |
| 32 | + simctl_runtime: "com.apple.CoreSimulator.SimRuntime.iOS-17-5" |
| 33 | + installation_required: false |
| 34 | + |
| 35 | + - sdk: "18.1" |
| 36 | + simctl_runtime: "com.apple.CoreSimulator.SimRuntime.iOS-18-1" |
| 37 | + installation_required: false |
| 38 | + |
| 39 | + steps: |
| 40 | + - uses: actions/checkout@v4 |
| 41 | + - uses: jdx/mise-action@v2 |
| 42 | + |
| 43 | + - name: Switch to Xcode ${{ env.XCODE_VERSION }} |
| 44 | + run: sudo xcode-select -s /Applications/Xcode_${{ env.XCODE_VERSION }}.app |
| 45 | + |
| 46 | + - name: Install iOS ${{ matrix.sdk }} |
| 47 | + if: ${{ matrix.installation_required }} |
| 48 | + run: sudo xcodes runtimes install "iOS ${{ matrix.sdk }}" |
| 49 | + |
| 50 | + - name: Ensure sim exists |
| 51 | + run: | |
| 52 | + xcrun simctl create \ |
| 53 | + "${{ env.TUIST_TEST_DEVICE }}" \ |
| 54 | + "${{ env.TUIST_TEST_DEVICE }}" \ |
| 55 | + "${{ matrix.simctl_runtime }}" |
| 56 | +
|
| 57 | + - name: Install dependencies |
| 58 | + run: tuist install --path Samples |
| 59 | + |
| 60 | + - name: Run Tests |
| 61 | + run: tuist test --path Samples ${{ matrix.scheme }} --os "${{ matrix.sdk }}" |
| 62 | + |
| 63 | + # FIXME: these should probably be run with a matrix too |
| 64 | + snapshot-tests: |
| 65 | + runs-on: macos-latest |
| 66 | + |
| 67 | + env: |
| 68 | + TUIST_TEST_OS: 18.1 |
| 69 | + TUIST_TEST_SCHEME: SnapshotTests |
| 70 | + |
| 71 | + strategy: |
| 72 | + fail-fast: false # Don’t fail-fast so that we get all snapshot test changes |
25 | 73 |
|
26 | 74 | steps: |
27 | 75 | - uses: actions/checkout@v4 |
28 | 76 | - uses: jdx/mise-action@v2 |
29 | 77 |
|
30 | 78 | - name: Switch Xcode |
31 | | - run: sudo xcode-select -s /Applications/Xcode_${XCODE_VERSION}.app |
| 79 | + run: sudo xcode-select -s /Applications/Xcode_${{ env.XCODE_VERSION }}.app |
32 | 80 |
|
33 | 81 | - name: Install dependencies |
34 | 82 | run: tuist install --path Samples |
35 | 83 |
|
36 | | - - name: Test iOS |
37 | | - run: tuist test --path Samples ${{ matrix.scheme }} |
| 84 | + - name: Run Snapshot Tests |
| 85 | + run: tuist test --path Samples |
38 | 86 |
|
39 | 87 | package-tests: |
40 | 88 | runs-on: macos-latest |
|
43 | 91 | - uses: actions/checkout@v4 |
44 | 92 |
|
45 | 93 | - name: Switch Xcode |
46 | | - run: sudo xcode-select -s /Applications/Xcode_${XCODE_VERSION}.app |
| 94 | + run: sudo xcode-select -s /Applications/Xcode_${{ env.XCODE_VERSION }}.app |
47 | 95 |
|
48 | 96 | # Command line swift runs on the host platform. |
49 | 97 | # On macOS we can run all tests, including macro tests. |
|
58 | 106 | - uses: jdx/mise-action@v2 |
59 | 107 |
|
60 | 108 | - name: Switch Xcode |
61 | | - run: sudo xcode-select -s /Applications/Xcode_${XCODE_VERSION}.app |
| 109 | + run: sudo xcode-select -s /Applications/Xcode_${{ env.XCODE_VERSION }}.app |
62 | 110 |
|
63 | 111 | - name: Install dependencies |
64 | 112 | run: tuist install --path Samples/Tutorial |
|
0 commit comments