1name: iOS Unit Tests 2 3on: 4 workflow_dispatch: {} 5 pull_request: 6 paths: 7 - .github/workflows/ios-unit-tests.yml 8 - ios/** 9 - packages/**/ios/** 10 - tools/src/dynamic-macros/** 11 - tools/src/commands/IosGenerateDynamicMacros.ts 12 - tools/src/commands/IosNativeUnitTests.ts 13 - tools/src/commands/NativeUnitTests.ts 14 - secrets/** 15 - fastlane/** 16 - Gemfile.lock 17 - .ruby-version 18 push: 19 branches: [main] 20 paths: 21 - .github/workflows/ios-unit-tests.yml 22 - ios/** 23 - packages/**/ios/** 24 - tools/src/dynamic-macros/** 25 - tools/src/commands/IosGenerateDynamicMacros.ts 26 - tools/src/commands/IosNativeUnitTests.ts 27 - tools/src/commands/NativeUnitTests.ts 28 - secrets/** 29 - fastlane/** 30 - Gemfile.lock 31 - .ruby-version 32 33concurrency: 34 group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }} 35 cancel-in-progress: true 36 37jobs: 38 build: 39 runs-on: macos-11 40 timeout-minutes: 60 41 steps: 42 - name: Checkout 43 uses: actions/checkout@v3 44 with: 45 submodules: true 46 - name: Switch to Xcode 13.0 47 run: sudo xcode-select --switch /Applications/Xcode_13.0.app 48 - name: Decrypt secrets if possible 49 uses: ./.github/actions/expo-git-decrypt 50 with: 51 key: ${{ secrets.GIT_CRYPT_KEY_BASE64 }} 52 - name: ➕ Add `bin` to GITHUB_PATH 53 run: echo "$(pwd)/bin" >> $GITHUB_PATH 54 - name: Setup Ruby and install gems 55 uses: ruby/setup-ruby@v1 56 with: 57 bundler-cache: true 58 - name: ♻️ Restore caches 59 uses: ./.github/actions/expo-caches 60 id: expo-caches 61 with: 62 yarn-workspace: 'true' 63 yarn-tools: 'true' 64 ios-pods: 'true' 65 bare-expo-pods: 'true' 66 - name: Yarn install 67 if: steps.expo-caches.outputs.yarn-workspace-hit != 'true' 68 run: yarn install --frozen-lockfile 69 - name: Generating dynamic macros 70 run: expotools ios-generate-dynamic-macros 71 - name: Install CocoaPods in `ios` 72 if: steps.expo-caches.outputs.ios-pods-hit != 'true' 73 run: pod install 74 working-directory: ios 75 - name: Install CocoaPods in `apps/bare-expo/ios` 76 if: steps.expo-caches.outputs.bare-expo-pods-hit != 'true' 77 run: pod install 78 working-directory: apps/bare-expo/ios 79 - name: Run native iOS unit tests 80 timeout-minutes: 45 81 run: expotools native-unit-tests --platform ios 82