database.yml 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. name: database
  2. permissions:
  3. contents: read
  4. on:
  5. workflow_dispatch:
  6. pull_request:
  7. paths:
  8. - 'FirebaseDatabase**'
  9. - 'Firebase/Database/**'
  10. - 'FirebaseSharedSwift**'
  11. - 'Example/Database/**'
  12. - 'FirebaseAuth/Interop/*.h'
  13. - '.github/workflows/database.yml'
  14. - '.github/workflows/common.yml'
  15. - '.github/workflows/common_cocoapods.yml'
  16. - '.github/workflows/common_catalyst.yml'
  17. - '.github/workflows/common_quickstart.yml'
  18. - 'Gemfile*'
  19. - 'scripts/run_database_emulator.sh'
  20. schedule:
  21. # Run every day at 3am (PDT) / 6am (EDT) - cron uses UTC times
  22. - cron: '0 10 * * *'
  23. concurrency:
  24. group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
  25. cancel-in-progress: true
  26. jobs:
  27. spm:
  28. strategy:
  29. matrix:
  30. target: [DatabaseUnit, DatabaseUnitSwift]
  31. uses: ./.github/workflows/common.yml
  32. with:
  33. target: ${{ matrix.target }}
  34. catalyst:
  35. uses: ./.github/workflows/common_catalyst.yml
  36. with:
  37. product: FirebaseDatabase
  38. target: FirebaseDatabase-Unit-unit
  39. pod_lib_lint:
  40. uses: ./.github/workflows/common_cocoapods.yml
  41. with:
  42. product: FirebaseDatabase
  43. test_specs: unit
  44. buildonly_platforms: macOS
  45. integration:
  46. # Don't run on private repo unless it is a PR.
  47. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  48. runs-on: macos-15
  49. steps:
  50. - uses: actions/checkout@v4
  51. - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126
  52. with:
  53. cache_key: integration${{ matrix.os }}
  54. - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
  55. - name: Setup Bundler
  56. run: scripts/setup_bundler.sh
  57. - name: Install xcpretty
  58. run: gem install xcpretty
  59. - name: Xcode
  60. run: sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer
  61. - name: IntegrationTest
  62. # Only iOS to mitigate flakes.
  63. run: scripts/third_party/travis/retry.sh scripts/build.sh Database iOS integration
  64. quickstart:
  65. uses: ./.github/workflows/common_quickstart.yml
  66. strategy:
  67. matrix:
  68. quickstart_type: [objc, swift]
  69. with:
  70. product: Database
  71. is_legacy: false
  72. setup_command: scripts/setup_quickstart.sh database
  73. plist_src_path: scripts/gha-encrypted/qs-database.plist.gpg
  74. plist_dst_path: quickstart-ios/database/GoogleService-Info.plist
  75. quickstart_type: ${{ matrix.quickstart_type }}
  76. run_tests: false
  77. secrets:
  78. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  79. database-cron-only:
  80. # Don't run on private repo.
  81. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  82. runs-on: macos-15
  83. strategy:
  84. matrix:
  85. podspec: [FirebaseDatabase.podspec]
  86. target: [ios, tvos, macos]
  87. flags: [
  88. '--skip-tests --use-static-frameworks'
  89. ]
  90. needs: pod_lib_lint
  91. steps:
  92. - uses: actions/checkout@v4
  93. - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
  94. - name: Xcode
  95. run: sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer
  96. - name: Setup Bundler
  97. run: scripts/setup_bundler.sh
  98. - name: PodLibLint database Cron
  99. run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb ${{ matrix.podspec }} --platforms=${{ matrix.target }} ${{ matrix.flags }}