database.yml 3.8 KB

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