auth.yml 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  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 11pm (PST) - cron uses UTC times
  11. - cron: '0 7 * * *'
  12. jobs:
  13. pod-lib-lint:
  14. # Don't run on private repo unless it is a PR.
  15. if: github.repository != 'FirebasePrivate/firebase-ios-sdk' || github.event_name == 'pull_request'
  16. runs-on: macOS-latest
  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: Build and test
  25. run: |
  26. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseAuth.podspec --platforms=${{ matrix.target }}
  27. integration-tests:
  28. # Don't run on private repo unless it is a PR.
  29. if: github.repository != 'FirebasePrivate/firebase-ios-sdk' || github.event_name == 'pull_request'
  30. env:
  31. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  32. runs-on: macos-latest
  33. steps:
  34. - uses: actions/checkout@v2
  35. - name: Setup Bundler
  36. run: scripts/setup_bundler.sh
  37. - name: Prereqs
  38. run: scripts/install_prereqs.sh Auth iOS
  39. - name: Install Secrets
  40. run: |
  41. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/AuthCredentials.h.gpg \
  42. FirebaseAuth/Tests/Sample/ApiTests/AuthCredentials.h "$plist_secret"
  43. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/AuthSample/Application.plist.gpg \
  44. FirebaseAuth/Tests/Sample/Sample/Application.plist "$plist_secret"
  45. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/AuthSample/AuthCredentials.h.gpg \
  46. FirebaseAuth/Tests/Sample/Sample/AuthCredentials.h "$plist_secret"
  47. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/AuthSample/GoogleService-Info.plist.gpg \
  48. FirebaseAuth/Tests/Sample/Sample/GoogleService-Info.plist "$plist_secret"
  49. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/AuthSample/GoogleService-Info_multi.plist.gpg \
  50. FirebaseAuth/Tests/Sample/Sample/GoogleService-Info_multi.plist "$plist_secret"
  51. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/AuthSample/Sample.entitlements.gpg \
  52. FirebaseAuth/Tests/Sample/Sample/Sample.entitlements "$plist_secret"
  53. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/AuthSample/Credentials.swift.gpg \
  54. FirebaseAuth/Tests/Sample/SwiftApiTests/Credentials.swift "$plist_secret"
  55. - name: BuildAndTest # can be replaced with pod lib lint with CocoaPods 1.10
  56. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/build.sh Auth iOS)
  57. spm:
  58. # Don't run on private repo unless it is a PR.
  59. if: github.repository != 'FirebasePrivate/firebase-ios-sdk' || github.event_name == 'pull_request'
  60. runs-on: macOS-latest
  61. steps:
  62. - uses: actions/checkout@v2
  63. - name: Xcode 12
  64. run: sudo xcode-select -s /Applications/Xcode_12.app/Contents/Developer
  65. - name: Initialize xcodebuild
  66. run: xcodebuild -list
  67. - name: iOS Unit Tests
  68. run: scripts/third_party/travis/retry.sh ./scripts/build.sh AuthUnit iOS spm
  69. spm-cron:
  70. # Don't run on private repo.
  71. if: github.event_name == 'schedule' && github.repository != 'FirebasePrivate/firebase-ios-sdk'
  72. runs-on: macOS-latest
  73. strategy:
  74. matrix:
  75. target: [tvOS, macOS, catalyst]
  76. steps:
  77. - uses: actions/checkout@v2
  78. - name: Xcode 12
  79. run: sudo xcode-select -s /Applications/Xcode_12.app/Contents/Developer
  80. - name: Initialize xcodebuild
  81. run: xcodebuild -list
  82. - name: Unit Tests
  83. run: scripts/third_party/travis/retry.sh ./scripts/build.sh AuthUnit ${{ matrix.target }} spm
  84. catalyst:
  85. # Don't run on private repo unless it is a PR.
  86. if: github.repository != 'FirebasePrivate/firebase-ios-sdk' || github.event_name == 'pull_request'
  87. runs-on: macOS-latest
  88. steps:
  89. - uses: actions/checkout@v2
  90. - name: Setup Bundler
  91. run: scripts/setup_bundler.sh
  92. - name: Setup project and Build for Catalyst
  93. # Only build the unit tests on Catalyst
  94. run: scripts/test_catalyst.sh FirebaseAuth build FirebaseAuth-Unit-unit
  95. quickstart:
  96. # Don't run on private repo unless it is a PR.
  97. if: github.repository != 'FirebasePrivate/firebase-ios-sdk' || github.event_name == 'pull_request'
  98. env:
  99. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  100. signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  101. runs-on: macOS-latest
  102. steps:
  103. - uses: actions/checkout@v2
  104. - name: Setup quickstart
  105. run: scripts/setup_quickstart.sh authentication
  106. - name: Install Secret GoogleService-Info.plist
  107. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-auth.plist.gpg \
  108. quickstart-ios/authentication/GoogleService-Info.plist "$plist_secret"
  109. - name: Install Secret FIREGSignInInfo.h
  110. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/FIREGSignInInfo.h.gpg \
  111. quickstart-ios/TestUtils/FIREGSignInInfo.h "$signin_secret"
  112. - name: Test swift quickstart
  113. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Authentication)
  114. auth-cron-only:
  115. # Don't run on private repo.
  116. if: github.event_name == 'schedule' && github.repository != 'FirebasePrivate/firebase-ios-sdk'
  117. runs-on: macos-latest
  118. strategy:
  119. matrix:
  120. # The macos and tvos tests can hang, and watchOS doesn't have tests.
  121. target: [ios, tvos --skip-tests, macos --skip-tests, watchos --skip-tests]
  122. flags: [
  123. '--use-modular-headers',
  124. '--use-libraries'
  125. ]
  126. needs: pod-lib-lint
  127. steps:
  128. - uses: actions/checkout@v2
  129. - name: Setup Bundler
  130. run: scripts/setup_bundler.sh
  131. - name: PodLibLint Auth Cron
  132. run: |
  133. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseAuth.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }}
  134. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseAuth.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }}