abtesting.yml 6.2 KB

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