database.yml 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. name: database
  2. on:
  3. pull_request:
  4. paths:
  5. - 'FirebaseDatabase**'
  6. - 'Firebase/Database/**'
  7. - 'Example/Database/**'
  8. - 'Interop/Auth/Public/*.h'
  9. - '.github/workflows/database.yml'
  10. - 'Gemfile*'
  11. - 'scripts/run_database_emulator.sh'
  12. schedule:
  13. # Run every day at 2am (PST) - cron uses UTC times
  14. - cron: '0 10 * * *'
  15. jobs:
  16. unit:
  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]
  23. steps:
  24. - uses: actions/checkout@v2
  25. - name: Setup Bundler
  26. run: scripts/setup_bundler.sh
  27. - name: BuildAndTest # can be replaced with pod lib lint with CocoaPods 1.10
  28. run: scripts/third_party/travis/retry.sh scripts/build.sh Database ${{ matrix.target }} unit
  29. integration:
  30. # Don't run on private repo unless it is a PR.
  31. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  32. runs-on: macos-11
  33. steps:
  34. - uses: actions/checkout@v2
  35. - name: Setup Bundler
  36. run: scripts/setup_bundler.sh
  37. - name: IntegrationTest
  38. # Only iOS to mitigate flakes.
  39. run: scripts/third_party/travis/retry.sh scripts/build.sh Database iOS integration
  40. spm:
  41. # Don't run on private repo unless it is a PR.
  42. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  43. runs-on: macos-11
  44. steps:
  45. - uses: actions/checkout@v2
  46. - name: Initialize xcodebuild
  47. run: scripts/setup_spm_tests.sh
  48. - name: iOS Unit Tests
  49. run: scripts/third_party/travis/retry.sh ./scripts/build.sh DatabaseUnit iOS spm
  50. - name: iOS Swift Unit Tests
  51. run: scripts/third_party/travis/retry.sh ./scripts/build.sh DatabaseUnitSwift iOS spm
  52. spm-cron:
  53. # Don't run on private repo.
  54. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  55. runs-on: macos-11
  56. strategy:
  57. matrix:
  58. target: [tvOS, macOS, catalyst]
  59. steps:
  60. - uses: actions/checkout@v2
  61. - name: Initialize xcodebuild
  62. run: scripts/setup_spm_tests.sh
  63. - name: Unit Tests
  64. run: scripts/third_party/travis/retry.sh ./scripts/build.sh DatabaseUnit ${{ matrix.target }} spm
  65. - name: iOS Swift Unit Tests
  66. run: scripts/third_party/travis/retry.sh ./scripts/build.sh DatabaseUnitSwift ${{ matrix.target }} spm
  67. catalyst:
  68. # Don't run on private repo unless it is a PR.
  69. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  70. runs-on: macos-11
  71. steps:
  72. - uses: actions/checkout@v2
  73. - name: Setup Bundler
  74. run: scripts/setup_bundler.sh
  75. - name: Setup project and Build for Catalyst
  76. run: scripts/test_catalyst.sh FirebaseDatabase test FirebaseDatabase-Unit-unit
  77. # Restore when FirebaseUI works with Firebase 7 (#6646)
  78. quickstart:
  79. # Don't run on private repo unless it is a PR.
  80. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  81. env:
  82. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  83. signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  84. runs-on: macos-11
  85. steps:
  86. - uses: actions/checkout@v2
  87. - name: Setup quickstart
  88. run: scripts/setup_quickstart.sh database
  89. - name: Install Secret GoogleService-Info.plist
  90. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-database.plist.gpg \
  91. quickstart-ios/database/GoogleService-Info.plist "$plist_secret"
  92. - name: Test objc quickstart
  93. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Database false)
  94. - name: Test swift quickstart
  95. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Database false swift)
  96. pod-lib-lint:
  97. # Don't run on private repo unless it is a PR.
  98. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  99. runs-on: macos-11
  100. strategy:
  101. matrix:
  102. target: [ios, tvos, macos, watchos]
  103. steps:
  104. - uses: actions/checkout@v2
  105. - name: Setup Bundler
  106. run: scripts/setup_bundler.sh
  107. - name: Build and test
  108. run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseDatabase.podspec --skip-tests --platforms=${{ matrix.target }}
  109. database-cron-only:
  110. # Don't run on private repo.
  111. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  112. runs-on: macos-11
  113. strategy:
  114. matrix:
  115. target: [ios, tvos, macos]
  116. flags: [
  117. '--skip-tests --use-static-frameworks',
  118. '--skip-tests --use-libraries'
  119. ]
  120. needs: pod-lib-lint
  121. steps:
  122. - uses: actions/checkout@v2
  123. - name: Setup Bundler
  124. run: scripts/setup_bundler.sh
  125. - name: PodLibLint database Cron
  126. run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseDatabase.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }}
  127. podspec-presubmit:
  128. # Don't run on private repo unless it is a PR.
  129. if: github.repository == 'Firebase/firebase-ios-sdk' && github.event.pull_request.merged != true && github.event.action != 'closed'
  130. runs-on: macos-11
  131. steps:
  132. - uses: actions/checkout@v2
  133. - name: Setup Bundler
  134. run: scripts/setup_bundler.sh
  135. - name: Build and test
  136. run: scripts/third_party/travis/retry.sh pod spec lint FirebaseDatabase.podspec --skip-tests --sources='https://github.com/firebase/SpecsTesting','https://github.com/firebase/SpecsDev.git','https://github.com/firebase/SpecsStaging.git','https://cdn.cocoapods.org/'