auth.yml 6.5 KB

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