auth.yml 6.3 KB

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