database.yml 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  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. schedule:
  12. # Run every day at 11pm (PST) - cron uses UTC times
  13. - cron: '0 7 * * *'
  14. jobs:
  15. unit:
  16. # Don't run on private repo unless it is a PR.
  17. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  18. runs-on: macos-latest
  19. strategy:
  20. matrix:
  21. target: [iOS, tvOS, macOS]
  22. steps:
  23. - uses: actions/checkout@v2
  24. - name: Setup Bundler
  25. run: scripts/setup_bundler.sh
  26. - name: BuildAndTest # can be replaced with pod lib lint with CocoaPods 1.10
  27. run: scripts/third_party/travis/retry.sh scripts/build.sh Database ${{ matrix.target }} unit
  28. integration:
  29. # Don't run on private repo unless it is a PR.
  30. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  31. runs-on: macos-latest
  32. steps:
  33. - uses: actions/checkout@v2
  34. - name: Setup Bundler
  35. run: scripts/setup_bundler.sh
  36. - name: IntegrationTest
  37. # Only iOS to mitigate flakes.
  38. run: scripts/third_party/travis/retry.sh scripts/build.sh Database iOS integration
  39. spm:
  40. # Don't run on private repo unless it is a PR.
  41. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  42. runs-on: macOS-latest
  43. steps:
  44. - uses: actions/checkout@v2
  45. - name: Xcode 12
  46. run: sudo xcode-select -s /Applications/Xcode_12.app/Contents/Developer
  47. - name: Initialize xcodebuild
  48. run: xcodebuild -list
  49. - name: iOS Unit Tests
  50. run: scripts/third_party/travis/retry.sh ./scripts/build.sh DatabaseUnit iOS spm
  51. spm-cron:
  52. # Don't run on private repo.
  53. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  54. runs-on: macOS-latest
  55. strategy:
  56. matrix:
  57. target: [tvOS, macOS, catalyst]
  58. steps:
  59. - uses: actions/checkout@v2
  60. - name: Xcode 12
  61. run: sudo xcode-select -s /Applications/Xcode_12.app/Contents/Developer
  62. - name: Initialize xcodebuild
  63. run: xcodebuild -list
  64. - name: Unit Tests
  65. run: scripts/third_party/travis/retry.sh ./scripts/build.sh DatabaseUnit ${{ matrix.target }} spm
  66. catalyst:
  67. # Don't run on private repo unless it is a PR.
  68. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  69. runs-on: macOS-latest
  70. steps:
  71. - uses: actions/checkout@v2
  72. - name: Setup Bundler
  73. run: scripts/setup_bundler.sh
  74. - name: Setup project and Build for Catalyst
  75. # Only build the unit tests on Catalyst. Test stopped working when GHA moved to Xcode 11.4.1.
  76. run: scripts/test_catalyst.sh FirebaseDatabase build 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-latest
  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: Install Secret FIREGSignInInfo.h
  93. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/FIREGSignInInfo.h.gpg \
  94. quickstart-ios/TestUtils/FIREGSignInInfo.h "$signin_secret"
  95. - name: Test objc quickstart
  96. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Database)
  97. - name: Test swift quickstart
  98. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Database swift)
  99. pod-lib-lint:
  100. # Don't run on private repo unless it is a PR.
  101. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  102. runs-on: macOS-latest
  103. strategy:
  104. matrix:
  105. target: [ios, tvos, macos]
  106. steps:
  107. - uses: actions/checkout@v2
  108. - name: Setup Bundler
  109. run: scripts/setup_bundler.sh
  110. - name: Build and test
  111. run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseDatabase.podspec --skip-tests --platforms=${{ matrix.target }}
  112. database-cron-only:
  113. # Don't run on private repo.
  114. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  115. runs-on: macos-latest
  116. strategy:
  117. matrix:
  118. target: [ios, tvos, macos]
  119. flags: [
  120. '--skip-tests --use-static-frameworks',
  121. '--skip-tests --use-libraries'
  122. ]
  123. needs: pod-lib-lint
  124. steps:
  125. - uses: actions/checkout@v2
  126. - name: Setup Bundler
  127. run: scripts/setup_bundler.sh
  128. - name: PodLibLint database Cron
  129. run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseDatabase.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }}