abtesting.yml 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  1. name: abtesting
  2. on:
  3. pull_request:
  4. paths:
  5. - 'FirebaseABTesting**'
  6. - 'Interop/Analytics/Public/*.h'
  7. - '.github/workflows/abtesting.yml'
  8. - 'Gemfile*'
  9. schedule:
  10. # Run every day at 1am(PST) - cron uses UTC times
  11. - cron: '0 9 * * *'
  12. concurrency:
  13. group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
  14. cancel-in-progress: true
  15. jobs:
  16. pod-lib-lint:
  17. # Don't run on private repo unless it is a PR.
  18. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  19. strategy:
  20. matrix:
  21. # TODO: macos tests are blocked by https://github.com/erikdoe/ocmock/pull/532
  22. target: [ios, tvos, macos --skip-tests, watchos]
  23. os: [macos-12, macos-13]
  24. include:
  25. - os: macos-12
  26. xcode: Xcode_14.2
  27. - os: macos-13
  28. xcode: Xcode_15.2
  29. runs-on: ${{ matrix.os }}
  30. steps:
  31. - uses: actions/checkout@v4
  32. - uses: ruby/setup-ruby@v1
  33. - name: Setup Bundler
  34. run: scripts/setup_bundler.sh
  35. - name: Xcode
  36. run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
  37. - uses: nick-fields/retry@v3
  38. with:
  39. timeout_minutes: 120
  40. max_attempts: 3
  41. retry_on: error
  42. retry_wait_seconds: 120
  43. command: scripts/pod_lib_lint.rb FirebaseABTesting.podspec --platforms=${{ matrix.target }}
  44. spm:
  45. # Don't run on private repo unless it is a PR.
  46. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  47. strategy:
  48. matrix:
  49. target: [iOS, tvOS, macOS, catalyst, watchOS]
  50. os: [macos-12, macos-13, macos-14]
  51. include:
  52. - os: macos-12
  53. xcode: Xcode_14.2
  54. - os: macos-13
  55. xcode: Xcode_15.2
  56. - os: macos-14
  57. xcode: Xcode_15.2
  58. - os: macos-14
  59. xcode: Xcode_15.2
  60. target: visionOS
  61. runs-on: ${{ matrix.os }}
  62. steps:
  63. - uses: actions/checkout@v4
  64. - name: Xcode
  65. run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
  66. - name: Initialize xcodebuild
  67. run: scripts/setup_spm_tests.sh
  68. - uses: nick-fields/retry@v3
  69. with:
  70. timeout_minutes: 120
  71. max_attempts: 3
  72. retry_on: error
  73. retry_wait_seconds: 120
  74. command: scripts/build.sh ABTestingUnit ${{ matrix.target }} spm
  75. catalyst:
  76. # Don't run on private repo unless it is a PR.
  77. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  78. runs-on: macos-12
  79. steps:
  80. - uses: actions/checkout@v4
  81. - uses: ruby/setup-ruby@v1
  82. - name: Setup Bundler
  83. run: scripts/setup_bundler.sh
  84. - uses: nick-fields/retry@v3
  85. with:
  86. timeout_minutes: 120
  87. max_attempts: 3
  88. retry_on: error
  89. retry_wait_seconds: 120
  90. command: scripts/test_catalyst.sh FirebaseABTesting test FirebaseABTesting-Unit-unit
  91. quickstart:
  92. # Don't run on private repo unless it is a PR.
  93. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  94. env:
  95. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  96. signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  97. runs-on: macos-12
  98. steps:
  99. - uses: actions/checkout@v4
  100. - uses: ruby/setup-ruby@v1
  101. - name: Setup quickstart
  102. env:
  103. LEGACY: true
  104. run: scripts/setup_quickstart.sh abtesting
  105. - name: Install Secret GoogleService-Info.plist
  106. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-abtesting.plist.gpg \
  107. quickstart-ios/abtesting/GoogleService-Info.plist "$plist_secret"
  108. - name: Test swift quickstart
  109. env:
  110. LEGACY: true
  111. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh ABTesting true)
  112. quickstart-ftl-cron-only:
  113. # Don't run on private repo.
  114. if: github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule'
  115. env:
  116. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  117. signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  118. runs-on: macos-12
  119. steps:
  120. - uses: actions/checkout@v4
  121. - uses: ruby/setup-ruby@v1
  122. - uses: actions/setup-python@v4
  123. with:
  124. python-version: '3.11'
  125. - name: Setup quickstart
  126. env:
  127. LEGACY: true
  128. run: scripts/setup_quickstart.sh abtesting
  129. - name: Install Secret GoogleService-Info.plist
  130. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-abtesting.plist.gpg \
  131. quickstart-ios/abtesting/GoogleService-Info.plist "$plist_secret"
  132. - name: Build swift quickstart
  133. env:
  134. LEGACY: true
  135. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_ftl.sh ABTesting)
  136. - id: ftl_test
  137. uses: FirebaseExtended/github-actions/firebase-test-lab@v1.4
  138. with:
  139. credentials_json: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_CREDENTIALS }}
  140. testapp_dir: quickstart-ios/build-for-testing
  141. test_type: "xctest"
  142. abtesting-cron-only:
  143. # Don't run on private repo.
  144. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  145. runs-on: macos-12
  146. strategy:
  147. matrix:
  148. target: [ios, tvos, macos]
  149. flags: [
  150. '--use-static-frameworks'
  151. ]
  152. needs: pod-lib-lint
  153. steps:
  154. - uses: actions/checkout@v4
  155. - uses: ruby/setup-ruby@v1
  156. - name: Setup Bundler
  157. run: scripts/setup_bundler.sh
  158. - name: PodLibLint ABTesting Cron
  159. run: |
  160. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb \
  161. FirebaseABTesting.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }}