auth.yml 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  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_beta.app/Contents/Developer
  65. - name: Initialize xcodebuild
  66. run: xcodebuild -list
  67. - name: iOS Unit Tests
  68. run: scripts/third_party/travis/retry.sh xcodebuild -scheme AuthUnit test -sdk
  69. iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 11' | xcpretty
  70. spm-cron:
  71. # Don't run on private repo.
  72. if: github.event_name == 'schedule' && github.repository != 'FirebasePrivate/firebase-ios-sdk'
  73. runs-on: macOS-latest
  74. steps:
  75. - uses: actions/checkout@v2
  76. - name: Xcode 12
  77. run: sudo xcode-select -s /Applications/Xcode_12_beta.app/Contents/Developer
  78. - name: Initialize xcodebuild
  79. run: xcodebuild -list
  80. - name: macOS Unit Tests
  81. run: scripts/third_party/travis/retry.sh xcodebuild -scheme AuthUnit test | xcpretty
  82. - name: tvOS Unit Tests
  83. run: scripts/third_party/travis/retry.sh xcodebuild -scheme AuthUnit test -sdk
  84. appletvsimulator -destination 'platform=tvOS Simulator,name=Apple TV' | xcpretty
  85. catalyst:
  86. # Don't run on private repo unless it is a PR.
  87. if: github.repository != 'FirebasePrivate/firebase-ios-sdk' || github.event_name == 'pull_request'
  88. runs-on: macOS-latest
  89. steps:
  90. - uses: actions/checkout@v2
  91. - name: Setup Bundler
  92. run: scripts/setup_bundler.sh
  93. - name: Setup project and Build for Catalyst
  94. # Only build the unit tests on Catalyst
  95. run: scripts/test_catalyst.sh FirebaseAuth build FirebaseAuth-Unit-unit
  96. quickstart:
  97. # Don't run on private repo unless it is a PR.
  98. if: github.repository != 'FirebasePrivate/firebase-ios-sdk' || github.event_name == 'pull_request'
  99. env:
  100. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  101. signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  102. runs-on: macOS-latest
  103. steps:
  104. - uses: actions/checkout@v2
  105. - name: Setup quickstart
  106. run: scripts/setup_quickstart.sh authentication
  107. - name: Install Secret GoogleService-Info.plist
  108. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-auth.plist.gpg \
  109. quickstart-ios/authentication/GoogleService-Info.plist "$plist_secret"
  110. - name: Install Secret FIREGSignInInfo.h
  111. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/FIREGSignInInfo.h.gpg \
  112. quickstart-ios/TestUtils/FIREGSignInInfo.h "$signin_secret"
  113. - name: Test swift quickstart
  114. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Authentication)
  115. auth-cron-only:
  116. # Don't run on private repo.
  117. if: github.event_name == 'schedule' && github.repository != 'FirebasePrivate/firebase-ios-sdk'
  118. runs-on: macos-latest
  119. strategy:
  120. matrix:
  121. # The macos and tvos tests can hang, and watchOS doesn't have tests.
  122. target: [ios, tvos --skip-tests, macos --skip-tests, watchos --skip-tests]
  123. flags: [
  124. '--use-modular-headers',
  125. '--use-libraries'
  126. ]
  127. needs: pod-lib-lint
  128. steps:
  129. - uses: actions/checkout@v2
  130. - name: Setup Bundler
  131. run: scripts/setup_bundler.sh
  132. - name: PodLibLint Auth Cron
  133. run: |
  134. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseAuth.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }}
  135. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseAuth.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }}