auth.yml 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  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 != 'FirebasePrivate/firebase-ios-sdk' || github.event_name == 'pull_request'
  16. runs-on: macOS-latest
  17. strategy:
  18. matrix:
  19. target: [ios, tvos, macos]
  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 != 'FirebasePrivate/firebase-ios-sdk' || 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. catalyst:
  58. # Don't run on private repo unless it is a PR.
  59. if: github.repository != 'FirebasePrivate/firebase-ios-sdk' || github.event_name == 'pull_request'
  60. runs-on: macOS-latest
  61. steps:
  62. - uses: actions/checkout@v2
  63. - name: Setup Bundler
  64. run: scripts/setup_bundler.sh
  65. - name: Setup project and Build for Catalyst
  66. # Only build the unit tests on Catalyst
  67. run: scripts/test_catalyst.sh FirebaseAuth build FirebaseAuth-Unit-unit
  68. quickstart:
  69. # Don't run on private repo unless it is a PR.
  70. if: github.repository != 'FirebasePrivate/firebase-ios-sdk' || github.event_name == 'pull_request'
  71. env:
  72. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  73. signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  74. runs-on: macOS-latest
  75. steps:
  76. - uses: actions/checkout@v2
  77. - name: Setup quickstart
  78. run: scripts/setup_quickstart.sh authentication
  79. - name: Install Secret GoogleService-Info.plist
  80. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-auth.plist.gpg \
  81. quickstart-ios/authentication/GoogleService-Info.plist "$plist_secret"
  82. - name: Install Secret FIREGSignInInfo.h
  83. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/FIREGSignInInfo.h.gpg \
  84. quickstart-ios/TestUtils/FIREGSignInInfo.h "$signin_secret"
  85. - name: Test objc quickstart
  86. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Authentication)
  87. - name: Test swift quickstart
  88. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Authentication swift)
  89. auth-cron-only:
  90. # Don't run on private repo.
  91. if: github.event_name == 'schedule' && github.repository != 'FirebasePrivate/firebase-ios-sdk'
  92. runs-on: macos-latest
  93. strategy:
  94. matrix:
  95. target: [ios, tvos --skip-tests, macos --skip-tests] # The macos and tvos tests can hang
  96. flags: [
  97. '--use-modular-headers',
  98. '--use-libraries'
  99. ]
  100. needs: pod-lib-lint
  101. steps:
  102. - uses: actions/checkout@v2
  103. - name: Setup Bundler
  104. run: scripts/setup_bundler.sh
  105. - name: PodLibLint Auth Cron
  106. run: |
  107. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseAuth.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }}
  108. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseAuth.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }}