auth.yml 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  1. name: auth
  2. permissions:
  3. contents: read
  4. on:
  5. workflow_dispatch:
  6. pull_request:
  7. paths:
  8. - 'FirebaseAuth**'
  9. - 'FirebaseAuth/Interop/*.h'
  10. - '.github/workflows/auth.yml'
  11. - '.github/workflows/common.yml'
  12. - '.github/workflows/common_cocoapods.yml'
  13. - '.github/workflows/common_catalyst.yml'
  14. - 'scripts/gha-encrypted/AuthSample/SwiftApplication.plist.gpg'
  15. - 'Gemfile*'
  16. schedule:
  17. # Run every day at 1am (PST) - cron uses UTC times
  18. - cron: '0 9 * * *'
  19. env:
  20. FIREBASE_CI: true
  21. concurrency:
  22. group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
  23. cancel-in-progress: true
  24. jobs:
  25. spm:
  26. uses: ./.github/workflows/common.yml
  27. with:
  28. target: AuthUnit
  29. buildonly_platforms: macOS
  30. catalyst:
  31. uses: ./.github/workflows/common_catalyst.yml
  32. with:
  33. product: FirebaseAuth
  34. target: FirebaseAuth-Unit-unit
  35. buildonly: true
  36. pod_lib_lint:
  37. strategy:
  38. matrix:
  39. product: [FirebaseAuthInterop, FirebaseAuth]
  40. uses: ./.github/workflows/common_cocoapods.yml
  41. with:
  42. product: ${{ matrix.product }}
  43. buildonly_platforms: macOS
  44. integration-tests:
  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. needs: spm
  48. strategy:
  49. matrix:
  50. scheme: [ObjCApiTests, SwiftApiTests, AuthenticationExampleUITests]
  51. env:
  52. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  53. FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1
  54. runs-on: macos-15
  55. steps:
  56. - uses: actions/checkout@v4
  57. - uses: actions/cache/restore@v4
  58. with:
  59. path: .build
  60. key: ${{ needs.spm.outputs.cache_key }}
  61. - name: Install Secrets
  62. run: |
  63. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/AuthCredentials.h.gpg \
  64. FirebaseAuth/Tests/SampleSwift/ObjCApiTests/AuthCredentials.h "$plist_secret"
  65. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/AuthSample/SwiftApplication.plist.gpg \
  66. FirebaseAuth/Tests/SampleSwift/AuthenticationExample/SwiftApplication.plist "$plist_secret"
  67. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/AuthSample/AuthCredentials.h.gpg \
  68. FirebaseAuth/Tests/SampleSwift/AuthCredentials.h "$plist_secret"
  69. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/AuthSample/GoogleService-Info.plist.gpg \
  70. FirebaseAuth/Tests/SampleSwift/GoogleService-Info.plist "$plist_secret"
  71. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/AuthSample/GoogleService-Info_multi.plist.gpg \
  72. FirebaseAuth/Tests/SampleSwift/GoogleService-Info_multi.plist "$plist_secret"
  73. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/AuthSample/Sample.entitlements.gpg \
  74. FirebaseAuth/Tests/SampleSwift/Sample.entitlements "$plist_secret"
  75. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/AuthSample/Credentials.swift.gpg \
  76. FirebaseAuth/Tests/SampleSwift/SwiftApiTests/Credentials.swift "$plist_secret"
  77. - name: Xcode
  78. run: sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer
  79. - uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3
  80. with:
  81. timeout_minutes: 120
  82. max_attempts: 3
  83. retry_on: error
  84. retry_wait_seconds: 120
  85. command: ([ -z $plist_secret ] || scripts/build.sh Auth iOS ${{ matrix.scheme }})
  86. quickstart:
  87. # Don't run on private repo unless it is a PR.
  88. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  89. env:
  90. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  91. signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  92. runs-on: macos-15
  93. steps:
  94. - uses: actions/checkout@v4
  95. - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
  96. - name: Setup quickstart
  97. run: scripts/setup_quickstart.sh authentication
  98. - name: Install Secret GoogleService-Info.plist
  99. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-auth.plist.gpg \
  100. quickstart-ios/authentication/GoogleService-Info.plist "$plist_secret"
  101. - name: Test swift quickstart
  102. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Authentication false)
  103. # TODO(@sunmou99): currently have issue with this job, will re-enable it once the issue resolved.
  104. # quickstart-ftl-cron-only:
  105. # # Don't run on private repo.
  106. # if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  107. # env:
  108. # plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  109. # signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  110. # runs-on: macos-14
  111. # steps:
  112. # - uses: actions/checkout@v4
  113. # - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
  114. # - uses: actions/setup-python@v5
  115. # with:
  116. # python-version: '3.11'
  117. # - name: Setup quickstart
  118. # run: scripts/setup_quickstart.sh authentication
  119. # - name: Install Secret GoogleService-Info.plist
  120. # run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-auth.plist.gpg \
  121. # quickstart-ios/authentication/GoogleService-Info.plist "$plist_secret"
  122. # - name: Build swift quickstart
  123. # run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_ftl.sh Authentication)
  124. # - id: ftl_test
  125. # uses: FirebaseExtended/github-actions/firebase-test-lab@v1.4
  126. # with:
  127. # credentials_json: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_CREDENTIALS }}
  128. # testapp_dir: quickstart-ios/build-for-testing
  129. # test_type: "xctest"
  130. auth-cron-only:
  131. # Don't run on private repo.
  132. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  133. runs-on: macos-15
  134. strategy:
  135. matrix:
  136. # The macos and tvos tests can hang, and watchOS doesn't have tests.
  137. target: [ios, tvos --skip-tests, macos --skip-tests, watchos --skip-tests]
  138. flags: [
  139. '--use-static-frameworks'
  140. ]
  141. needs: pod_lib_lint
  142. steps:
  143. - uses: actions/checkout@v4
  144. - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
  145. - name: Setup Bundler
  146. run: scripts/setup_bundler.sh
  147. - name: Configure test keychain
  148. run: scripts/configure_test_keychain.sh
  149. - uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3
  150. with:
  151. timeout_minutes: 120
  152. max_attempts: 3
  153. retry_on: error
  154. retry_wait_seconds: 120
  155. command: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseAuth.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }}