inappmessaging.yml 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. name: inappmessaging
  2. on:
  3. pull_request:
  4. paths:
  5. - 'FirebaseInAppMessaging**'
  6. - 'Interop/Analytics/Public/*.h'
  7. - '.github/workflows/inappmessaging.yml'
  8. - 'Gemfile*'
  9. schedule:
  10. # Run every day at 10pm (PST) - cron uses UTC times
  11. - cron: '0 6 * * *'
  12. concurrency:
  13. group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
  14. cancel-in-progress: true
  15. jobs:
  16. pod_lib_lint:
  17. # Don't run on private repo unless it is a PR.
  18. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  19. runs-on: macos-12
  20. strategy:
  21. matrix:
  22. podspec: [FirebaseInAppMessaging.podspec, FirebaseInAppMessagingSwift.podspec]
  23. steps:
  24. - uses: actions/checkout@v3
  25. - uses: ruby/setup-ruby@v1
  26. - name: Setup Bundler
  27. run: scripts/setup_bundler.sh
  28. - name: FirebaseInAppMessaging
  29. run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb ${{ matrix.podspec}}
  30. tests:
  31. # Don't run on private repo unless it is a PR.
  32. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  33. runs-on: macos-12
  34. strategy:
  35. matrix:
  36. # TODO(#8682): Reenable iPad after fixing Xcode 13 test failures.
  37. # platform: [iOS, iPad]
  38. platform: [iOS]
  39. steps:
  40. - uses: actions/checkout@v3
  41. - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126
  42. with:
  43. cache_key: ${{ matrix.os }}
  44. - uses: ruby/setup-ruby@v1
  45. - name: Setup Bundler
  46. run: scripts/setup_bundler.sh
  47. - name: Prereqs
  48. run: scripts/install_prereqs.sh InAppMessaging ${{ matrix.platform }} xcodebuild
  49. - name: Build and test
  50. run: scripts/third_party/travis/retry.sh scripts/build.sh InAppMessaging ${{ matrix.platform }} xcodebuild
  51. spm:
  52. # Don't run on private repo unless it is a PR.
  53. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  54. runs-on: macos-12
  55. steps:
  56. - uses: actions/checkout@v3
  57. - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126
  58. with:
  59. cache_key: ${{ matrix.os }}
  60. - name: Initialize xcodebuild
  61. run: scripts/setup_spm_tests.sh
  62. - name: iOS Unit Tests
  63. run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseInAppMessaging-Beta iOS spmbuildonly
  64. fiam-cron-only:
  65. # Don't run on private repo.
  66. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  67. runs-on: macos-12
  68. strategy:
  69. matrix:
  70. flags: [
  71. '--use-static-frameworks'
  72. ]
  73. platform: [ios, tvos]
  74. needs: pod_lib_lint
  75. steps:
  76. - uses: actions/checkout@v3
  77. - uses: ruby/setup-ruby@v1
  78. - name: Setup Bundler
  79. run: scripts/setup_bundler.sh
  80. - name: PodLibLint InAppMessaging Cron
  81. run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseInAppMessaging.podspec --platforms=${{ matrix.platform }} ${{ matrix.flags }}
  82. quickstart:
  83. # Don't run on private repo unless it is a PR.
  84. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  85. env:
  86. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  87. signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  88. runs-on: macos-12
  89. steps:
  90. - uses: actions/checkout@v3
  91. - uses: actions/checkout@v3
  92. - uses: ruby/setup-ruby@v1
  93. - name: Setup quickstart
  94. run: scripts/setup_quickstart.sh inappmessaging
  95. - name: install secret googleservice-info.plist
  96. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-inappmessaging.plist.gpg \
  97. quickstart-ios/inappmessaging/GoogleService-Info.plist "$plist_secret"
  98. - name: Test objc quickstart
  99. run: ([ -z $plist_secret ] ||
  100. scripts/third_party/travis/retry.sh scripts/test_quickstart.sh InAppMessaging true)
  101. - name: Test swift quickstart
  102. run: ([ -z $plist_secret ] ||
  103. scripts/third_party/travis/retry.sh scripts/test_quickstart.sh InAppMessaging true swift)