auth.yml 6.0 KB

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