database.yml 3.9 KB

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