inappmessaging.yml 4.0 KB

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