auth.yml 6.5 KB

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