database.yml 3.9 KB

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