remoteconfig.yml 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. name: remoteconfig
  2. on:
  3. pull_request:
  4. paths:
  5. - 'FirebaseRemoteConfig**'
  6. - 'Interop/Analytics/Public/*.h'
  7. - '.github/workflows/remoteconfig.yml'
  8. - 'Gemfile*'
  9. - 'scripts/generate_access_token.sh'
  10. schedule:
  11. # Run every day at 12am (PST) - cron uses UTC times
  12. - cron: '0 8 * * *'
  13. jobs:
  14. remoteconfig:
  15. # Don't run on private repo unless it is a PR.
  16. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  17. env:
  18. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  19. runs-on: macos-11
  20. strategy:
  21. matrix:
  22. target: [iOS, tvOS, macOS]
  23. steps:
  24. - uses: actions/checkout@v2
  25. - name: Setup Bundler
  26. run: scripts/setup_bundler.sh
  27. - name: Install Secret GoogleService-Info.plist
  28. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/RemoteConfigSwiftAPI/GoogleService-Info.plist.gpg \
  29. FirebaseRemoteConfig/Tests/SwiftAPI/GoogleService-Info.plist "$plist_secret"
  30. - name: Generate Access Token for RemoteConfigConsoleAPI in IntegrationTests
  31. if: matrix.target == 'iOS'
  32. run: ([ -z $plist_secret ] || scripts/generate_access_token.sh "$plist_secret" scripts/gha-encrypted/RemoteConfigSwiftAPI/ServiceAccount.json.gpg
  33. FirebaseRemoteConfig/Tests/SwiftAPI/AccessToken.json)
  34. - name: BuildAndUnitTest # can be replaced with pod lib lint with CocoaPods 1.10
  35. run: scripts/third_party/travis/retry.sh scripts/build.sh RemoteConfig ${{ matrix.target }} unit
  36. - name: Fake Console API Tests
  37. run: scripts/third_party/travis/retry.sh scripts/build.sh RemoteConfig iOS fakeconsole
  38. - name: IntegrationTest
  39. if: matrix.target == 'iOS'
  40. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/build.sh RemoteConfig iOS integration)
  41. pod-lib-lint:
  42. # Don't run on private repo unless it is a PR.
  43. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  44. runs-on: macos-11
  45. strategy:
  46. matrix:
  47. target: [ios, tvos, macos, watchos]
  48. steps:
  49. - uses: actions/checkout@v2
  50. - name: Setup Bundler
  51. run: scripts/setup_bundler.sh
  52. - name: Build and test
  53. run: |
  54. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseRemoteConfig.podspec --skip-tests --platforms=${{ matrix.target }}
  55. spm:
  56. # Don't run on private repo unless it is a PR.
  57. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  58. runs-on: macos-11
  59. steps:
  60. - uses: actions/checkout@v2
  61. - name: Initialize xcodebuild
  62. run: scripts/setup_spm_tests.sh
  63. - name: iOS Unit Tests
  64. run: scripts/third_party/travis/retry.sh ./scripts/build.sh RemoteConfigUnit iOS spm
  65. spm-cron:
  66. # Don't run on private repo.
  67. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  68. runs-on: macos-11
  69. strategy:
  70. matrix:
  71. target: [tvOS, macOS, catalyst]
  72. steps:
  73. - uses: actions/checkout@v2
  74. - name: Initialize xcodebuild
  75. run: scripts/setup_spm_tests.sh
  76. - name: Unit Tests
  77. run: scripts/third_party/travis/retry.sh ./scripts/build.sh RemoteConfigUnit ${{ matrix.target }} spm
  78. catalyst:
  79. # Don't run on private repo unless it is a PR.
  80. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  81. runs-on: macos-11
  82. steps:
  83. - uses: actions/checkout@v2
  84. - name: Setup Bundler
  85. run: scripts/setup_bundler.sh
  86. - name: Setup project and Build for Catalyst
  87. run: scripts/test_catalyst.sh FirebaseRemoteConfig test FirebaseRemoteConfig-Unit-unit
  88. quickstart:
  89. # Don't run on private repo unless it is a PR.
  90. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  91. env:
  92. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  93. signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  94. runs-on: macos-11
  95. steps:
  96. - uses: actions/checkout@v2
  97. - name: Setup quickstart
  98. run: scripts/setup_quickstart.sh config
  99. - name: Install Secret GoogleService-Info.plist
  100. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-config.plist.gpg \
  101. quickstart-ios/config/GoogleService-Info.plist "$plist_secret"
  102. - name: Test Swift Quickstart
  103. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Config true)
  104. sample-build-test:
  105. # Don't run on private repo unless it is a PR.
  106. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  107. runs-on: macos-11
  108. steps:
  109. - uses: actions/checkout@v2
  110. - name: Setup Bundler
  111. run: scripts/setup_bundler.sh
  112. - name: Prereqs
  113. run: scripts/install_prereqs.sh RemoteConfigSample iOS
  114. - name: Build
  115. run: scripts/build.sh RemoteConfigSample iOS
  116. remoteconfig-cron-only:
  117. # Don't run on private repo.
  118. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  119. runs-on: macos-11
  120. strategy:
  121. matrix:
  122. target: [ios, tvos, macos]
  123. flags: [
  124. '--skip-tests --use-static-frameworks',
  125. '--skip-tests --use-libraries'
  126. ]
  127. needs: pod-lib-lint
  128. steps:
  129. - uses: actions/checkout@v2
  130. - name: Setup Bundler
  131. run: scripts/setup_bundler.sh
  132. - name: PodLibLint RemoteConfig Cron
  133. run: |
  134. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseRemoteConfig.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }}
  135. podspec-presubmit:
  136. # Don't run on private repo unless it is a PR.
  137. if: github.repository == 'Firebase/firebase-ios-sdk' && github.event.pull_request.merged != true && github.event.action != 'closed'
  138. runs-on: macos-11
  139. steps:
  140. - uses: actions/checkout@v2
  141. - name: Setup Bundler
  142. run: scripts/setup_bundler.sh
  143. - name: Build and test
  144. run: scripts/third_party/travis/retry.sh pod spec lint FirebaseRemoteConfig.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/'