CacheStorage (2/3) #1813
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: Tests | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| jobs: | |
| spm: | |
| name: "iOS ${{ matrix.sdk }}" | |
| runs-on: macos-15-xlarge | |
| env: | |
| TUIST_TEST_DEVICE: iPhone SE (3rd generation) | |
| TUIST_TEST_PLATFORM: iOS | |
| strategy: | |
| fail-fast: false # Don’t fail-fast so that we get all snapshot test changes | |
| matrix: | |
| include: | |
| - sdk: "15.4" | |
| simctl_runtime: "com.apple.CoreSimulator.SimRuntime.iOS-15-4" | |
| installation_required: true | |
| - sdk: "16.2" | |
| simctl_runtime: "com.apple.CoreSimulator.SimRuntime.iOS-16-2" | |
| installation_required: true | |
| - sdk: "17.2" | |
| simctl_runtime: "com.apple.CoreSimulator.SimRuntime.iOS-17-2" | |
| installation_required: true | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: jdx/mise-action@v2 | |
| - name: Read env | |
| run: cat .github/workflows/env.properties >> $GITHUB_ENV | |
| - name: Switch to Xcode ${{ env.xcode_version }} | |
| run: sudo xcode-select -s /Applications/Xcode_${{ env.xcode_version }}.app | |
| - name: Install aria2 | |
| run: brew install aria2 | |
| - name: Install iOS ${{ matrix.sdk }} | |
| if: ${{ matrix.installation_required }} | |
| run: sudo xcodes runtimes install "iOS ${{ matrix.sdk }}" | |
| - name: Ensure sim exists | |
| run: | | |
| xcrun simctl create \ | |
| "${{ env.TUIST_TEST_DEVICE }}" \ | |
| "${{ env.TUIST_TEST_DEVICE }}" \ | |
| "${{ matrix.simctl_runtime }}" | |
| - name: Install dependencies | |
| run: tuist install --path SampleApp | |
| - name: Build & Test | |
| run: tuist test --path SampleApp --os ${{ matrix.sdk }} UnitTests -- -resultBundlePath TestResult | |
| - name: Package snapshot changes | |
| if: ${{ failure() }} | |
| run: | | |
| git ls-files -mo BlueprintUICommonControls/Tests/Sources/Resources/ReferenceImages | xargs tar -cvf snapshot_changes_${{ matrix.sdk }}.tar | |
| - name: Archive snapshot changes | |
| uses: actions/upload-artifact@v4 | |
| if: ${{ failure() }} | |
| with: | |
| name: snapshot_changes_${{ matrix.sdk }} | |
| path: snapshot_changes_${{ matrix.sdk }}.tar | |
| - name: Archive TestResult | |
| uses: actions/upload-artifact@v4 | |
| if: ${{ failure() }} | |
| with: | |
| name: TestResult.xcresult | |
| path: TestResult.xcresult |