name: iOS Unit Tests on: workflow_dispatch: {} pull_request: paths: - .github/workflows/ios-unit-tests.yml - ios/** - packages/**/ios/** - tools/src/dynamic-macros/** - tools/src/commands/IosGenerateDynamicMacros.ts - tools/src/commands/IosNativeUnitTests.ts - tools/src/commands/NativeUnitTests.ts - secrets/** - fastlane/** - Gemfile.lock - .ruby-version - '!packages/@expo/cli/**' push: branches: [main] paths: - .github/workflows/ios-unit-tests.yml - ios/** - packages/**/ios/** - tools/src/dynamic-macros/** - tools/src/commands/IosGenerateDynamicMacros.ts - tools/src/commands/IosNativeUnitTests.ts - tools/src/commands/NativeUnitTests.ts - secrets/** - fastlane/** - Gemfile.lock - .ruby-version - '!packages/@expo/cli/**' concurrency: group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }} cancel-in-progress: true jobs: build: runs-on: macos-11 timeout-minutes: 60 steps: - name: ๐Ÿ‘€ Checkout uses: actions/checkout@v3 with: submodules: true - name: ๐Ÿ”จ Switch to Xcode 13.2.1 run: sudo xcode-select --switch /Applications/Xcode_13.2.1.app - name: ๐Ÿ”“ Decrypt secrets if possible uses: ./.github/actions/expo-git-decrypt with: key: ${{ secrets.GIT_CRYPT_KEY_BASE64 }} - name: โž• Add `bin` to GITHUB_PATH run: echo "$(pwd)/bin" >> $GITHUB_PATH - name: ๐Ÿ’Ž Setup Ruby and install gems uses: ruby/setup-ruby@v1 with: bundler-cache: true - name: โ™ป๏ธ Restore caches uses: ./.github/actions/expo-caches id: expo-caches with: yarn-workspace: 'true' yarn-tools: 'true' native-tests-pods: 'true' - name: ๐Ÿงถ Yarn install if: steps.expo-caches.outputs.yarn-workspace-hit != 'true' run: yarn install --frozen-lockfile - name: ๐Ÿฅฅ Install CocoaPods in `apps/native-tests/ios` if: steps.expo-caches.outputs.bare-expo-pods-hit != 'true' run: pod install working-directory: apps/native-tests/ios - name: ๐Ÿงช Run native iOS unit tests timeout-minutes: 45 env: FASTLANE_SKIP_UPDATE_CHECK: '1' run: expotools native-unit-tests --platform ios