auth.yml 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228
  1. name: auth
  2. on:
  3. pull_request:
  4. paths:
  5. - 'FirebaseAuth**'
  6. - 'FirebaseAuth/Interop/*.h'
  7. - '.github/workflows/auth.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') || github.event_name == 'pull_request'
  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. run: scripts/setup_quickstart.sh authentication
  31. - name: Install Secret GoogleService-Info.plist
  32. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-auth.plist.gpg \
  33. quickstart-ios/authentication/GoogleService-Info.plist "$plist_secret"
  34. - name: Build swift quickstart
  35. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_ftl.sh Authentication)
  36. - id: ftl_test
  37. uses: FirebaseExtended/github-actions/firebase-test-lab@v1.4
  38. with:
  39. credentials_json: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_CREDENTIALS }}
  40. testapp_dir: quickstart-ios/build-for-testing
  41. test_type: "xctest"
  42. #
  43. #
  44. # pod-lib-lint:
  45. # # Don't run on private repo unless it is a PR.
  46. # if: (github.repository == 'Firebase/firebase-ios-sdk') || github.event_name == 'pull_request'
  47. #
  48. # strategy:
  49. # matrix:
  50. # podspec: [FirebaseAuthInterop.podspec, FirebaseAuth.podspec]
  51. # # TODO: macos tests are blocked by https://github.com/erikdoe/ocmock/pull/532
  52. # target: [ios, tvos, macos --skip-tests, watchos]
  53. # os: [macos-14, macos-13]
  54. # include:
  55. # - os: macos-14
  56. # xcode: Xcode_15.3
  57. # tests: --skip-tests
  58. # - os: macos-13
  59. # xcode: Xcode_15.2
  60. # tests:
  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: Configure test keychain
  68. # run: scripts/configure_test_keychain.sh
  69. # - name: Xcode
  70. # run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
  71. # - uses: nick-fields/retry@v3
  72. # with:
  73. # timeout_minutes: 120
  74. # max_attempts: 3
  75. # retry_on: error
  76. # retry_wait_seconds: 120
  77. # command: scripts/pod_lib_lint.rb ${{ matrix.podspec }} --platforms=${{ matrix.target }} ${{ matrix.tests }}
  78. #
  79. # integration-tests:
  80. # # Don't run on private repo unless it is a PR.
  81. # if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  82. #
  83. # env:
  84. # plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  85. # runs-on: macos-13
  86. # steps:
  87. # - uses: actions/checkout@v4
  88. # - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126
  89. # with:
  90. # cache_key: integration-tests${{ matrix.os }}
  91. # - uses: ruby/setup-ruby@v1
  92. # - name: Setup Bundler
  93. # run: scripts/setup_bundler.sh
  94. # - name: Prereqs
  95. # run: scripts/install_prereqs.sh Auth iOS
  96. # - name: Install Secrets
  97. # run: |
  98. # scripts/decrypt_gha_secret.sh scripts/gha-encrypted/AuthCredentials.h.gpg \
  99. # FirebaseAuth/Tests/Sample/ApiTests/AuthCredentials.h "$plist_secret"
  100. # scripts/decrypt_gha_secret.sh scripts/gha-encrypted/AuthSample/Application.plist.gpg \
  101. # FirebaseAuth/Tests/Sample/Sample/Application.plist "$plist_secret"
  102. # scripts/decrypt_gha_secret.sh scripts/gha-encrypted/AuthSample/AuthCredentials.h.gpg \
  103. # FirebaseAuth/Tests/Sample/Sample/AuthCredentials.h "$plist_secret"
  104. # scripts/decrypt_gha_secret.sh scripts/gha-encrypted/AuthSample/GoogleService-Info.plist.gpg \
  105. # FirebaseAuth/Tests/Sample/Sample/GoogleService-Info.plist "$plist_secret"
  106. # scripts/decrypt_gha_secret.sh scripts/gha-encrypted/AuthSample/GoogleService-Info_multi.plist.gpg \
  107. # FirebaseAuth/Tests/Sample/Sample/GoogleService-Info_multi.plist "$plist_secret"
  108. # scripts/decrypt_gha_secret.sh scripts/gha-encrypted/AuthSample/Sample.entitlements.gpg \
  109. # FirebaseAuth/Tests/Sample/Sample/Sample.entitlements "$plist_secret"
  110. # scripts/decrypt_gha_secret.sh scripts/gha-encrypted/AuthSample/Credentials.swift.gpg \
  111. # FirebaseAuth/Tests/Sample/SwiftApiTests/Credentials.swift "$plist_secret"
  112. # - name: Xcode
  113. # run: sudo xcode-select -s /Applications/Xcode_15.1.app/Contents/Developer
  114. # - uses: nick-fields/retry@v3
  115. # with:
  116. # timeout_minutes: 120
  117. # max_attempts: 3
  118. # retry_on: error
  119. # retry_wait_seconds: 120
  120. # command: ([ -z $plist_secret ] || scripts/build.sh Auth iOS)
  121. #
  122. # spm:
  123. # # Don't run on private repo unless it is a PR.
  124. # if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  125. # strategy:
  126. # matrix:
  127. # target: [iOS, tvOS, macOS, catalyst, watchOS]
  128. # os: [macos-13, macos-14]
  129. # include:
  130. # - os: macos-13
  131. # xcode: Xcode_15.2
  132. # test: spmbuildonly
  133. # - os: macos-14
  134. # xcode: Xcode_15.3
  135. # test: spmbuildonly
  136. # - os: macos-14
  137. # xcode: Xcode_15.3
  138. # target: visionOS
  139. # test: spm
  140. # runs-on: ${{ matrix.os }}
  141. # steps:
  142. # - uses: actions/checkout@v4
  143. # - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126
  144. # with:
  145. # cache_key: spm${{ matrix.os }}-${{ matrix.xcode }}-${{ matrix.target }}
  146. # - name: Xcode
  147. # run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
  148. # - name: Initialize xcodebuild
  149. # run: scripts/setup_spm_tests.sh
  150. # - uses: nick-fields/retry@v3
  151. # with:
  152. # timeout_minutes: 120
  153. # max_attempts: 3
  154. # retry_on: error
  155. # retry_wait_seconds: 120
  156. # command: scripts/third_party/travis/retry.sh ./scripts/build.sh AuthUnit ${{ matrix.target }} ${{ matrix.test }}
  157. #
  158. # catalyst:
  159. # # Don't run on private repo unless it is a PR.
  160. # if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  161. # runs-on: macos-14
  162. # steps:
  163. # - uses: actions/checkout@v4
  164. # - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126
  165. # with:
  166. # cache_key: catalyst${{ matrix.os }}
  167. # - uses: ruby/setup-ruby@v1
  168. # - name: Setup Bundler
  169. # run: scripts/setup_bundler.sh
  170. # - uses: nick-fields/retry@v3
  171. # with:
  172. # timeout_minutes: 120
  173. # max_attempts: 3
  174. # retry_on: error
  175. # retry_wait_seconds: 120
  176. # command: scripts/test_catalyst.sh FirebaseAuth build FirebaseAuth-Unit-unit
  177. #
  178. # quickstart:
  179. # # Don't run on private repo unless it is a PR.
  180. # if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  181. #
  182. # env:
  183. # plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  184. # signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  185. # runs-on: macos-14
  186. # steps:
  187. # - uses: actions/checkout@v4
  188. # - uses: ruby/setup-ruby@v1
  189. # - name: Setup quickstart
  190. # run: scripts/setup_quickstart.sh authentication
  191. # - name: Install Secret GoogleService-Info.plist
  192. # run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-auth.plist.gpg \
  193. # quickstart-ios/authentication/GoogleService-Info.plist "$plist_secret"
  194. # - name: Test swift quickstart
  195. # run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Authentication false)
  196. #
  197. # auth-cron-only:
  198. # # Don't run on private repo.
  199. # if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  200. #
  201. # runs-on: macos-14
  202. # strategy:
  203. # matrix:
  204. # # The macos and tvos tests can hang, and watchOS doesn't have tests.
  205. # target: [ios, tvos --skip-tests, macos --skip-tests, watchos --skip-tests]
  206. # flags: [
  207. # '--use-static-frameworks'
  208. # ]
  209. # needs: pod-lib-lint
  210. # steps:
  211. # - uses: actions/checkout@v4
  212. # - uses: ruby/setup-ruby@v1
  213. # - name: Setup Bundler
  214. # run: scripts/setup_bundler.sh
  215. # - name: Configure test keychain
  216. # run: scripts/configure_test_keychain.sh
  217. # - uses: nick-fields/retry@v3
  218. # with:
  219. # timeout_minutes: 120
  220. # max_attempts: 3
  221. # retry_on: error
  222. # retry_wait_seconds: 120
  223. # command: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseAuth.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }}