auth.yml 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  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 == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || 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 == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || 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 == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  60. runs-on: macOS-latest
  61. strategy:
  62. matrix:
  63. target: [iOS, tvOS, macOS, catalyst]
  64. steps:
  65. - uses: actions/checkout@v2
  66. - name: Initialize xcodebuild
  67. run: xcodebuild -list
  68. - name: Unit Tests
  69. run: scripts/third_party/travis/retry.sh ./scripts/build.sh AuthUnit ${{ matrix.target }} spm
  70. catalyst:
  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-latest
  74. steps:
  75. - uses: actions/checkout@v2
  76. - name: Setup Bundler
  77. run: scripts/setup_bundler.sh
  78. - name: Setup project and Build for Catalyst
  79. # Only build the unit tests on Catalyst. Their keychain reliance causes several failures.
  80. run: scripts/test_catalyst.sh FirebaseAuth build FirebaseAuth-Unit-unit
  81. quickstart:
  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. env:
  85. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  86. signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  87. runs-on: macOS-latest
  88. steps:
  89. - uses: actions/checkout@v2
  90. - name: Setup quickstart
  91. run: scripts/setup_quickstart.sh authentication
  92. - name: Install Secret GoogleService-Info.plist
  93. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-auth.plist.gpg \
  94. quickstart-ios/authentication/GoogleService-Info.plist "$plist_secret"
  95. - name: Install Secret FIREGSignInInfo.h
  96. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/FIREGSignInInfo.h.gpg \
  97. quickstart-ios/TestUtils/FIREGSignInInfo.h "$signin_secret"
  98. - name: Test swift quickstart
  99. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Authentication)
  100. auth-cron-only:
  101. # Don't run on private repo.
  102. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  103. runs-on: macos-latest
  104. strategy:
  105. matrix:
  106. # The macos and tvos tests can hang, and watchOS doesn't have tests.
  107. target: [ios, tvos --skip-tests, macos --skip-tests, watchos --skip-tests]
  108. flags: [
  109. '--use-static-frameworks',
  110. '--use-libraries'
  111. ]
  112. needs: pod-lib-lint
  113. steps:
  114. - uses: actions/checkout@v2
  115. - name: Setup Bundler
  116. run: scripts/setup_bundler.sh
  117. - name: PodLibLint Auth Cron
  118. run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseAuth.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }}