auth.yml 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  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. - name: Setup Bundler
  38. run: scripts/setup_bundler.sh
  39. - name: Prereqs
  40. run: scripts/install_prereqs.sh Auth iOS
  41. - name: Install Secrets
  42. run: |
  43. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/AuthCredentials.h.gpg \
  44. FirebaseAuth/Tests/Sample/ApiTests/AuthCredentials.h "$plist_secret"
  45. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/AuthSample/Application.plist.gpg \
  46. FirebaseAuth/Tests/Sample/Sample/Application.plist "$plist_secret"
  47. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/AuthSample/AuthCredentials.h.gpg \
  48. FirebaseAuth/Tests/Sample/Sample/AuthCredentials.h "$plist_secret"
  49. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/AuthSample/GoogleService-Info.plist.gpg \
  50. FirebaseAuth/Tests/Sample/Sample/GoogleService-Info.plist "$plist_secret"
  51. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/AuthSample/GoogleService-Info_multi.plist.gpg \
  52. FirebaseAuth/Tests/Sample/Sample/GoogleService-Info_multi.plist "$plist_secret"
  53. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/AuthSample/Sample.entitlements.gpg \
  54. FirebaseAuth/Tests/Sample/Sample/Sample.entitlements "$plist_secret"
  55. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/AuthSample/Credentials.swift.gpg \
  56. FirebaseAuth/Tests/Sample/SwiftApiTests/Credentials.swift "$plist_secret"
  57. - name: BuildAndTest # can be replaced with pod lib lint with CocoaPods 1.10
  58. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/build.sh Auth iOS)
  59. spm:
  60. # Don't run on private repo unless it is a PR.
  61. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  62. runs-on: macos-11
  63. strategy:
  64. matrix:
  65. target: [iOS, tvOS, macOS, catalyst]
  66. steps:
  67. - uses: actions/checkout@v2
  68. - name: Initialize xcodebuild
  69. run: scripts/setup_spm_tests.sh
  70. - name: Unit Tests
  71. run: scripts/third_party/travis/retry.sh ./scripts/build.sh AuthUnit ${{ matrix.target }} spm
  72. catalyst:
  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-11
  76. steps:
  77. - uses: actions/checkout@v2
  78. - name: Setup Bundler
  79. run: scripts/setup_bundler.sh
  80. - name: Setup project and Build for Catalyst
  81. # Only build the unit tests on Catalyst. Their keychain reliance causes several failures.
  82. run: scripts/test_catalyst.sh FirebaseAuth build FirebaseAuth-Unit-unit
  83. quickstart:
  84. # Don't run on private repo unless it is a PR.
  85. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  86. env:
  87. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  88. signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  89. runs-on: macos-11
  90. steps:
  91. - uses: actions/checkout@v2
  92. - name: Setup quickstart
  93. run: scripts/setup_quickstart.sh authentication
  94. - name: Install Secret GoogleService-Info.plist
  95. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-auth.plist.gpg \
  96. quickstart-ios/authentication/GoogleService-Info.plist "$plist_secret"
  97. - name: Test swift quickstart
  98. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Authentication false)
  99. auth-cron-only:
  100. # Don't run on private repo.
  101. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  102. runs-on: macos-11
  103. strategy:
  104. matrix:
  105. # The macos and tvos tests can hang, and watchOS doesn't have tests.
  106. target: [ios, tvos --skip-tests, macos --skip-tests, watchos --skip-tests]
  107. flags: [
  108. '--use-static-frameworks',
  109. '--use-libraries'
  110. ]
  111. needs: pod-lib-lint
  112. steps:
  113. - uses: actions/checkout@v2
  114. - name: Setup Bundler
  115. run: scripts/setup_bundler.sh
  116. - name: Configure test keychain
  117. run: scripts/configure_test_keychain.sh
  118. - name: PodLibLint Auth Cron
  119. run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseAuth.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }}
  120. podspec-presubmit:
  121. # Don't run on private repo unless it is a PR.
  122. if: github.repository == 'Firebase/firebase-ios-sdk' && github.event.pull_request.merged != true && github.event.action != 'closed'
  123. runs-on: macos-11
  124. steps:
  125. - uses: actions/checkout@v2
  126. - name: Setup Bundler
  127. run: scripts/setup_bundler.sh
  128. - name: Build and test
  129. 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/'