auth.yml 9.1 KB

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