auth.yml 5.7 KB

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