inappmessaging.yml 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  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. jobs:
  13. pod_lib_lint:
  14. # Don't run on private repo unless it is a PR.
  15. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  16. runs-on: macos-11
  17. strategy:
  18. matrix:
  19. podspec: [FirebaseInAppMessaging.podspec, FirebaseInAppMessagingSwift.podspec]
  20. steps:
  21. - uses: actions/checkout@v2
  22. - name: Setup Bundler
  23. run: scripts/setup_bundler.sh
  24. - name: FirebaseInAppMessaging
  25. run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb ${{ matrix.podspec}}
  26. tests:
  27. # Don't run on private repo unless it is a PR.
  28. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  29. runs-on: macos-11
  30. strategy:
  31. matrix:
  32. # TODO(#8682): Reenable iPad after fixing Xcode 13 test failures.
  33. # platform: [iOS, iPad]
  34. platform: [iOS]
  35. steps:
  36. - uses: actions/checkout@v2
  37. - uses: mikehardy/buildcache-action@50738c6c77de7f34e66b870e4f8ede333b69d077
  38. with:
  39. cache_key: ${{ matrix.os }}
  40. - name: Setup Bundler
  41. run: scripts/setup_bundler.sh
  42. - name: Prereqs
  43. run: scripts/install_prereqs.sh InAppMessaging ${{ matrix.platform }} xcodebuild
  44. - name: Build and test
  45. run: scripts/third_party/travis/retry.sh scripts/build.sh InAppMessaging ${{ matrix.platform }} xcodebuild
  46. spm:
  47. # Don't run on private repo unless it is a PR.
  48. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  49. runs-on: macos-11
  50. steps:
  51. - uses: actions/checkout@v2
  52. - uses: mikehardy/buildcache-action@50738c6c77de7f34e66b870e4f8ede333b69d077
  53. with:
  54. cache_key: ${{ matrix.os }}
  55. - name: Initialize xcodebuild
  56. run: scripts/setup_spm_tests.sh
  57. - name: iOS Unit Tests
  58. run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseInAppMessaging-Beta iOS spmbuildonly
  59. fiam-cron-only:
  60. # Don't run on private repo.
  61. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  62. runs-on: macos-11
  63. strategy:
  64. matrix:
  65. flags: [
  66. '--use-static-frameworks',
  67. '--use-libraries'
  68. ]
  69. platform: [ios, tvos]
  70. needs: pod_lib_lint
  71. steps:
  72. - uses: actions/checkout@v2
  73. - name: Setup Bundler
  74. run: scripts/setup_bundler.sh
  75. - name: PodLibLint InAppMessaging Cron
  76. run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseInAppMessaging.podspec --platforms=${{ matrix.platform }} ${{ matrix.flags }}
  77. quickstart:
  78. # Don't run on private repo unless it is a PR.
  79. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  80. env:
  81. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  82. signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  83. runs-on: macos-11
  84. steps:
  85. - uses: actions/checkout@v2
  86. - name: Setup quickstart
  87. run: scripts/setup_quickstart.sh inappmessaging
  88. - name: install secret googleservice-info.plist
  89. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-inappmessaging.plist.gpg \
  90. quickstart-ios/inappmessaging/GoogleService-Info.plist "$plist_secret"
  91. - name: Test objc quickstart
  92. run: ([ -z $plist_secret ] ||
  93. scripts/third_party/travis/retry.sh scripts/test_quickstart.sh InAppMessaging true)
  94. - name: Test swift quickstart
  95. run: ([ -z $plist_secret ] ||
  96. scripts/third_party/travis/retry.sh scripts/test_quickstart.sh InAppMessaging true swift)
  97. podspec-presubmit:
  98. # Don't run on private repo unless it is a PR.
  99. if: github.repository == 'Firebase/firebase-ios-sdk' && github.event.pull_request.merged != true && github.event.action != 'closed'
  100. runs-on: macos-11
  101. strategy:
  102. matrix:
  103. podspec: [FirebaseInAppMessaging.podspec, FirebaseInAppMessagingSwift.podspec]
  104. steps:
  105. - uses: actions/checkout@v2
  106. - name: Setup Bundler
  107. run: scripts/setup_bundler.sh
  108. - name: Build and test
  109. run: scripts/third_party/travis/retry.sh pod spec lint ${{ matrix.podspec}} --skip-tests --sources='https://github.com/firebase/SpecsTesting','https://github.com/firebase/SpecsDev.git','https://github.com/firebase/SpecsStaging.git','https://cdn.cocoapods.org/'