Feature/ios endpoint content protection #854
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: Build iOS on PRs | |
| on: | |
| workflow_dispatch: | |
| pull_request: | |
| types: [opened, reopened, synchronize] | |
| paths: | |
| - .github/workflows/pr_ios.yml | |
| - example/** | |
| - e2e/** | |
| - package.json | |
| - src/** | |
| - ios/** | |
| jobs: | |
| build: | |
| runs-on: macos-15 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| xcode_version: [ '26.2.0' ] | |
| platform: [iOS, tvOS] | |
| name: Build for ${{ matrix.platform }} using XCode version ${{ matrix.xcode_version }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Select Xcode ${{ matrix.xcode_version }} | |
| uses: maxim-lobanov/setup-xcode@v1 | |
| with: | |
| xcode-version: ${{ matrix.xcode_version }} | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: 'npm' | |
| - name: Cache Ruby Gems | |
| uses: actions/cache@v4 | |
| with: | |
| path: vendor/bundle | |
| key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-gems- | |
| - name: Cache CocoaPods | |
| uses: actions/cache@v4 | |
| with: | |
| path: e2e/ios/Pods | |
| key: pods-${{ runner.os }}-${{ hashFiles('Podfile.lock') }} | |
| restore-keys: | | |
| pods-${{ runner.os }}- | |
| - name: Run patch scripts | |
| working-directory: e2e | |
| run: bash ./scripts/patch_ios_podspec.sh | |
| - name: Run npm install | |
| run: | | |
| npm i -g corepack | |
| npm ci | |
| cd e2e | |
| npm run update-dependencies | |
| npm ci | |
| - name: Install Ruby dependencies | |
| run: bundle install | |
| - name: Run pod install & update dependencies | |
| working-directory: e2e/ios | |
| run: | | |
| bundle exec pod update | |
| - name: Start iOS simulator | |
| uses: futureware-tech/simulator-action@v4 | |
| with: | |
| model: ${{ matrix.platform == 'iOS' && 'iPhone 17' || 'Apple TV' }} | |
| os: ${{ matrix.platform }} | |
| os_version: '>=26.2' | |
| - name: Run e2e tests | |
| working-directory: e2e | |
| run: npm run test:e2e:${{ matrix.platform == 'iOS' && 'ios' || 'tvos' }} | |
| - name: Summarize results | |
| working-directory: e2e | |
| if: always() | |
| run: cat cavy_results.md >> $GITHUB_STEP_SUMMARY | |
| - name: Collecting logs | |
| if: failure() | |
| run: xcrun simctl spawn booted log collect --output ~/crashlog.logarchive | |
| - name: Upload crash logs | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: crash-logs-${{ matrix.platform }} | |
| path: ~/crashlog.logarchive | |
| - name: Upload screenshots | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: e2e-screenshots-${{ matrix.platform }} | |
| path: e2e/screenshots |