auth.yml 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  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 3am (PST) - cron uses UTC times
  11. # This is set to 3 hours after zip workflow so zip testing can run after.
  12. - cron: '0 11 * * *'
  13. jobs:
  14. pod-lib-lint:
  15. # Don't run on private repo unless it is a PR.
  16. if: github.repository != 'FirebasePrivate/firebase-ios-sdk' || github.event_name == 'pull_request'
  17. runs-on: macOS-latest
  18. strategy:
  19. matrix:
  20. target: [ios, tvos, macos]
  21. steps:
  22. - uses: actions/checkout@v2
  23. - name: Setup Bundler
  24. run: scripts/setup_bundler.sh
  25. - name: Build and test
  26. run: |
  27. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseAuth.podspec --platforms=${{ matrix.target }}
  28. integration-tests:
  29. # Don't run on private repo unless it is a PR.
  30. if: github.repository != 'FirebasePrivate/firebase-ios-sdk' || github.event_name == 'pull_request'
  31. env:
  32. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  33. runs-on: macos-latest
  34. steps:
  35. - uses: actions/checkout@v2
  36. - name: Setup Bundler
  37. run: scripts/setup_bundler.sh
  38. - name: Prereqs
  39. run: scripts/install_prereqs.sh Auth iOS
  40. - name: Install Secrets
  41. run: |
  42. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/AuthCredentials.h.gpg \
  43. FirebaseAuth/Tests/Sample/ApiTests/AuthCredentials.h "$plist_secret"
  44. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/AuthSample/Application.plist.gpg \
  45. FirebaseAuth/Tests/Sample/Sample/Application.plist "$plist_secret"
  46. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/AuthSample/AuthCredentials.h.gpg \
  47. FirebaseAuth/Tests/Sample/Sample/AuthCredentials.h "$plist_secret"
  48. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/AuthSample/GoogleService-Info.plist.gpg \
  49. FirebaseAuth/Tests/Sample/Sample/GoogleService-Info.plist "$plist_secret"
  50. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/AuthSample/GoogleService-Info_multi.plist.gpg \
  51. FirebaseAuth/Tests/Sample/Sample/GoogleService-Info_multi.plist "$plist_secret"
  52. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/AuthSample/Sample.entitlements.gpg \
  53. FirebaseAuth/Tests/Sample/Sample/Sample.entitlements "$plist_secret"
  54. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/AuthSample/Credentials.swift.gpg \
  55. FirebaseAuth/Tests/Sample/SwiftApiTests/Credentials.swift "$plist_secret"
  56. - name: BuildAndTest # can be replaced with pod lib lint with CocoaPods 1.10
  57. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/build.sh Auth iOS)
  58. catalyst:
  59. # Don't run on private repo unless it is a PR.
  60. if: github.repository != 'FirebasePrivate/firebase-ios-sdk' || github.event_name == 'pull_request'
  61. runs-on: macOS-latest
  62. steps:
  63. - uses: actions/checkout@v2
  64. - name: Setup Bundler
  65. run: scripts/setup_bundler.sh
  66. - name: Setup project and Build for Catalyst
  67. # Only build the unit tests on Catalyst
  68. run: scripts/test_catalyst.sh FirebaseAuth build FirebaseAuth-Unit-unit
  69. quickstart:
  70. # Don't run on private repo unless it is a PR.
  71. if: github.repository != 'FirebasePrivate/firebase-ios-sdk' || github.event_name == 'pull_request'
  72. env:
  73. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  74. signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  75. runs-on: macOS-latest
  76. steps:
  77. - uses: actions/checkout@v2
  78. - name: Setup quickstart
  79. run: scripts/setup_quickstart.sh authentication
  80. - name: Install Secret GoogleService-Info.plist
  81. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-auth.plist.gpg \
  82. quickstart-ios/authentication/GoogleService-Info.plist "$plist_secret"
  83. - name: Install Secret FIREGSignInInfo.h
  84. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/FIREGSignInInfo.h.gpg \
  85. quickstart-ios/TestUtils/FIREGSignInInfo.h "$signin_secret"
  86. - name: Test swift quickstart
  87. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Authentication)
  88. auth-cron-only:
  89. # Don't run on private repo.
  90. if: github.event_name == 'schedule' && github.repository != 'FirebasePrivate/firebase-ios-sdk'
  91. runs-on: macos-latest
  92. strategy:
  93. matrix:
  94. target: [ios, tvos --skip-tests, macos --skip-tests] # The macos and tvos tests can hang
  95. flags: [
  96. '--use-modular-headers',
  97. '--use-libraries'
  98. ]
  99. needs: pod-lib-lint
  100. steps:
  101. - uses: actions/checkout@v2
  102. - name: Setup Bundler
  103. run: scripts/setup_bundler.sh
  104. - name: PodLibLint Auth Cron
  105. run: |
  106. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseAuth.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }}
  107. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseAuth.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }}