database.yml 5.4 KB

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