auth.yml 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  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. 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. runs-on: macos-12
  20. strategy:
  21. matrix:
  22. target: [ios, tvos, macos, watchos]
  23. steps:
  24. - uses: actions/checkout@v3
  25. - uses: ruby/setup-ruby@v1
  26. - name: Setup Bundler
  27. run: scripts/setup_bundler.sh
  28. - name: Configure test keychain
  29. run: scripts/configure_test_keychain.sh
  30. - name: Build and test
  31. run: |
  32. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseAuth.podspec --platforms=${{ matrix.target }}
  33. integration-tests:
  34. # Don't run on private repo unless it is a PR.
  35. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  36. env:
  37. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  38. runs-on: macos-12
  39. steps:
  40. - uses: actions/checkout@v3
  41. - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126
  42. with:
  43. cache_key: ${{ matrix.os }}
  44. - uses: ruby/setup-ruby@v1
  45. - name: Setup Bundler
  46. run: scripts/setup_bundler.sh
  47. - name: Prereqs
  48. run: scripts/install_prereqs.sh Auth iOS
  49. - name: Install Secrets
  50. run: |
  51. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/AuthCredentials.h.gpg \
  52. FirebaseAuth/Tests/Sample/ApiTests/AuthCredentials.h "$plist_secret"
  53. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/AuthSample/Application.plist.gpg \
  54. FirebaseAuth/Tests/Sample/Sample/Application.plist "$plist_secret"
  55. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/AuthSample/AuthCredentials.h.gpg \
  56. FirebaseAuth/Tests/Sample/Sample/AuthCredentials.h "$plist_secret"
  57. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/AuthSample/GoogleService-Info.plist.gpg \
  58. FirebaseAuth/Tests/Sample/Sample/GoogleService-Info.plist "$plist_secret"
  59. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/AuthSample/GoogleService-Info_multi.plist.gpg \
  60. FirebaseAuth/Tests/Sample/Sample/GoogleService-Info_multi.plist "$plist_secret"
  61. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/AuthSample/Sample.entitlements.gpg \
  62. FirebaseAuth/Tests/Sample/Sample/Sample.entitlements "$plist_secret"
  63. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/AuthSample/Credentials.swift.gpg \
  64. FirebaseAuth/Tests/Sample/SwiftApiTests/Credentials.swift "$plist_secret"
  65. - name: BuildAndTest # can be replaced with pod lib lint with CocoaPods 1.10
  66. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/build.sh Auth iOS)
  67. spm:
  68. # Don't run on private repo unless it is a PR.
  69. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  70. runs-on: macos-12
  71. strategy:
  72. matrix:
  73. target: [iOS, tvOS, macOS, catalyst, watchOS]
  74. steps:
  75. - uses: actions/checkout@v3
  76. - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126
  77. with:
  78. cache_key: ${{ matrix.os }}
  79. - name: Initialize xcodebuild
  80. run: scripts/setup_spm_tests.sh
  81. - name: Unit Tests
  82. run: scripts/third_party/travis/retry.sh ./scripts/build.sh AuthUnit ${{ matrix.target }} spm
  83. catalyst:
  84. # Don't run on private repo unless it is a PR.
  85. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  86. runs-on: macos-12
  87. steps:
  88. - uses: actions/checkout@v3
  89. - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126
  90. with:
  91. cache_key: ${{ matrix.os }}
  92. - uses: ruby/setup-ruby@v1
  93. - name: Setup Bundler
  94. run: scripts/setup_bundler.sh
  95. - name: Setup project and Build for Catalyst
  96. # Only build the unit tests on Catalyst. Their keychain reliance causes several failures.
  97. run: scripts/test_catalyst.sh FirebaseAuth build FirebaseAuth-Unit-unit
  98. quickstart:
  99. # Don't run on private repo unless it is a PR.
  100. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  101. env:
  102. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  103. signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  104. runs-on: macos-12
  105. steps:
  106. - uses: actions/checkout@v3
  107. - uses: ruby/setup-ruby@v1
  108. - name: Setup quickstart
  109. run: scripts/setup_quickstart.sh authentication
  110. - name: Install Secret GoogleService-Info.plist
  111. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-auth.plist.gpg \
  112. quickstart-ios/authentication/GoogleService-Info.plist "$plist_secret"
  113. - name: Test swift quickstart
  114. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Authentication false)
  115. # TODO(@sunmou99): currently have issue with this job, will re-enable it once the issue resolved.
  116. # quickstart-ftl-cron-only:
  117. # # Don't run on private repo.
  118. # if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  119. # env:
  120. # plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  121. # signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  122. # runs-on: macos-12
  123. # steps:
  124. # - uses: actions/checkout@v3
  125. # - uses: ruby/setup-ruby@v1
  126. # - name: Setup quickstart
  127. # run: scripts/setup_quickstart.sh authentication
  128. # - name: Install Secret GoogleService-Info.plist
  129. # run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-auth.plist.gpg \
  130. # quickstart-ios/authentication/GoogleService-Info.plist "$plist_secret"
  131. # - name: Build swift quickstart
  132. # run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_ftl.sh Authentication)
  133. # - id: ftl_test
  134. # uses: FirebaseExtended/github-actions/firebase-test-lab@v1.2
  135. # with:
  136. # credentials_json: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_CREDENTIALS }}
  137. # testapp_dir: quickstart-ios/build-for-testing
  138. # test_type: "xctest"
  139. auth-cron-only:
  140. # Don't run on private repo.
  141. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  142. runs-on: macos-12
  143. strategy:
  144. matrix:
  145. # The macos and tvos tests can hang, and watchOS doesn't have tests.
  146. target: [ios, tvos --skip-tests, macos --skip-tests, watchos --skip-tests]
  147. flags: [
  148. '--use-static-frameworks'
  149. ]
  150. needs: pod-lib-lint
  151. steps:
  152. - uses: actions/checkout@v3
  153. - uses: ruby/setup-ruby@v1
  154. - name: Setup Bundler
  155. run: scripts/setup_bundler.sh
  156. - name: Configure test keychain
  157. run: scripts/configure_test_keychain.sh
  158. - name: PodLibLint Auth Cron
  159. run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseAuth.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }}