messaging.yml 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. name: messaging
  2. on:
  3. pull_request:
  4. paths:
  5. - 'FirebaseMessaging/**'
  6. #Podspec
  7. - 'FirebaseMessaging.podspec'
  8. - '.github/workflows/messaging.yml'
  9. schedule:
  10. # Run every day at 11pm (PST) - cron uses UTC times
  11. - cron: '0 7 * * *'
  12. jobs:
  13. messaging:
  14. env:
  15. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  16. runs-on: macos-latest
  17. steps:
  18. - uses: actions/checkout@v2
  19. - name: Setup Bundler
  20. run: scripts/setup_bundler.sh
  21. - name: Install Secret GoogleService-Info.plist
  22. run: |
  23. mkdir FirebaseMessaging/Tests/IntegrationTests/Resources
  24. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/messaging-sample-plist.gpg \
  25. FirebaseMessaging/Tests/IntegrationTests/Resources/GoogleService-Info.plist "$plist_secret"
  26. - name: BuildAndTest # can be replaced with pod lib lint with CocoaPods 1.10
  27. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/build.sh Messaging all)
  28. pod-lib-lint:
  29. runs-on: macOS-latest
  30. strategy:
  31. matrix:
  32. target: [ios, tvos, macos --skip-tests] # skipping tests on mac because of keychain access
  33. steps:
  34. - uses: actions/checkout@v2
  35. - name: Setup Bundler
  36. run: scripts/setup_bundler.sh
  37. - name: Build and test
  38. run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseMessaging.podspec --platforms=${{ matrix.target }}
  39. catalyst:
  40. runs-on: macOS-latest
  41. steps:
  42. - uses: actions/checkout@v2
  43. - name: Setup Bundler
  44. run: scripts/setup_bundler.sh
  45. - name: Setup project and Build Catalyst
  46. run: scripts/test_catalyst.sh FirebaseMessaging build
  47. quickstart:
  48. runs-on: macOS-latest
  49. steps:
  50. - uses: actions/checkout@v2
  51. - name: Setup quickstart
  52. run: scripts/setup_quickstart.sh messaging
  53. - name: Install Secret GoogleService-Info.plist
  54. env:
  55. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  56. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-messaging.plist.gpg \
  57. quickstart-ios/messaging/GoogleService-Info.plist "$plist_secret"
  58. - name: Install Secret FIREGSignInInfo.h
  59. env:
  60. signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  61. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/FIREGSignInInfo.h.gpg \
  62. quickstart-ios/TestUtils/FIREGSignInInfo.h "$signin_secret"
  63. - name: Test quickstart
  64. run: scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Messaging
  65. pod-lib-lint-watchos:
  66. runs-on: macOS-latest
  67. steps:
  68. - uses: actions/checkout@v2
  69. - name: Setup Bundler
  70. run: scripts/setup_bundler.sh
  71. - name: Build and test
  72. run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseMessaging.podspec --skip-tests --platforms=watchos
  73. messaging-cron-only:
  74. runs-on: macos-latest
  75. if: github.event_name == 'schedule'
  76. strategy:
  77. matrix:
  78. target: [ios, tvos, macos --skip-tests]
  79. flags: [
  80. '--use-modular-headers',
  81. '--skip-tests --use-libraries'
  82. ]
  83. needs: pod-lib-lint
  84. steps:
  85. - uses: actions/checkout@v2
  86. - name: Setup Bundler
  87. run: scripts/setup_bundler.sh
  88. - name: PodLibLint Messaging Cron
  89. run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseMessaging.podspec --platforms=${{ matrix.target }}
  90. messaging-watchos-cron-only:
  91. runs-on: macos-latest
  92. if: github.event_name == 'schedule'
  93. strategy:
  94. matrix:
  95. flags: [
  96. '--skip-tests --use-modular-headers',
  97. '--skip-tests --use-libraries'
  98. ]
  99. needs: pod-lib-lint-watchos
  100. steps:
  101. - uses: actions/checkout@v2
  102. - name: Setup Bundler
  103. run: scripts/setup_bundler.sh
  104. - name: PodLibLint Messaging Cron
  105. run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseMessaging.podspec --platforms=watchos
  106. messaging-sample-build-test:
  107. env:
  108. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  109. runs-on: macos-latest
  110. steps:
  111. - uses: actions/checkout@v2
  112. - name: Setup Bundler
  113. run: scripts/setup_bundler.sh
  114. - name: Install Secret GoogleService-Info.plist
  115. run: |
  116. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/messaging-sample-plist.gpg \
  117. FirebaseMessaging/Apps/Sample/Sample/GoogleService-Info.plist "$plist_secret"
  118. - name: Prereqs
  119. run: scripts/install_prereqs.sh MessagingSample iOS
  120. - name: Build
  121. run: scripts/build.sh MessagingSample iOS