remoteconfig.yml 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  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. schedule:
  10. # Run every day at 3am (PST) - cron uses UTC times
  11. # This is set to 3 hours after zip workflow so zip testing can run after.
  12. - cron: '0 11 * * *'
  13. jobs:
  14. remoteconfig:
  15. # Don't run on private repo unless it is a PR.
  16. if: github.repository != 'FirebasePrivate/firebase-ios-sdk' || github.event_name == 'pull_request'
  17. env:
  18. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  19. runs-on: macos-latest
  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: BuildAndUnitTest # can be replaced with pod lib lint with CocoaPods 1.10
  31. run: scripts/third_party/travis/retry.sh scripts/build.sh RemoteConfig ${{ matrix.target }} unit
  32. - name: Fake Console API Tests
  33. run: scripts/third_party/travis/retry.sh scripts/build.sh RemoteConfig iOS fakeconsole
  34. - name: IntegrationTest
  35. if: matrix.target == 'iOS'
  36. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/build.sh RemoteConfig iOS integration)
  37. pod-lib-lint:
  38. # Don't run on private repo unless it is a PR.
  39. if: github.repository != 'FirebasePrivate/firebase-ios-sdk' || github.event_name == 'pull_request'
  40. runs-on: macOS-latest
  41. strategy:
  42. matrix:
  43. target: [ios, tvos, macos]
  44. steps:
  45. - uses: actions/checkout@v2
  46. - name: Setup Bundler
  47. run: scripts/setup_bundler.sh
  48. - name: Build and test
  49. run: |
  50. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseRemoteConfig.podspec --skip-tests --platforms=${{ matrix.target }}
  51. catalyst:
  52. # Don't run on private repo unless it is a PR.
  53. if: github.repository != 'FirebasePrivate/firebase-ios-sdk' || github.event_name == 'pull_request'
  54. runs-on: macOS-latest
  55. steps:
  56. - uses: actions/checkout@v2
  57. - name: Setup Bundler
  58. run: scripts/setup_bundler.sh
  59. - name: Setup project and Build for Catalyst
  60. # Only build the unit tests on Catalyst. Test stopped working when GHA moved to Xcode 11.4.1.
  61. run: scripts/test_catalyst.sh FirebaseRemoteConfig build FirebaseRemoteConfig-Unit-unit
  62. quickstart_framework:
  63. # Don't run on private repo.
  64. if: github.event_name == 'schedule' && github.repository != 'FirebasePrivate/firebase-ios-sdk'
  65. env:
  66. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  67. signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  68. FRAMEWORK_ZIP: "Firebase-actions-dir.zip"
  69. SDK: "Config"
  70. runs-on: macOS-latest
  71. steps:
  72. - uses: actions/checkout@v2
  73. - name: Pull zip from GCS
  74. run: scripts/pull_zip_gcloud.sh "$plist_secret" "$FRAMEWORK_ZIP" "${HOME}/ios_frameworks"
  75. - name: Setup quickstart
  76. run: SAMPLE="$SDK" TARGET="${SDK}Example" scripts/setup_quickstart_framework.sh \
  77. "${HOME}"/ios_frameworks/Firebase/FirebaseRemoteConfig/* \
  78. "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/*
  79. - name: Install Secret GoogleService-Info.plist
  80. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-config.plist.gpg \
  81. quickstart-ios/config/GoogleService-Info.plist "$plist_secret"
  82. - name: Install Secret FIREGSignInInfo.h
  83. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/FIREGSignInInfo.h.gpg \
  84. quickstart-ios/TestUtils/FIREGSignInInfo.h "$signin_secret"
  85. - name: Test Quickstart
  86. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}")
  87. - name: Remove data before upload
  88. if: ${{ failure() }}
  89. run: scripts/remove_data.sh "${SDK}"
  90. - uses: actions/upload-artifact@v2
  91. if: ${{ failure() }}
  92. with:
  93. name: quickstart_artifacts
  94. path: quickstart-ios/
  95. quickstart:
  96. # Don't run on private repo unless it is a PR.
  97. if: github.repository != 'FirebasePrivate/firebase-ios-sdk' || github.event_name == 'pull_request'
  98. env:
  99. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  100. signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  101. runs-on: macOS-latest
  102. steps:
  103. - uses: actions/checkout@v2
  104. - name: Setup quickstart
  105. run: scripts/setup_quickstart.sh config
  106. - name: Install Secret GoogleService-Info.plist
  107. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-config.plist.gpg \
  108. quickstart-ios/config/GoogleService-Info.plist "$plist_secret"
  109. - name: Install Secret FIREGSignInInfo.h
  110. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/FIREGSignInInfo.h.gpg \
  111. quickstart-ios/TestUtils/FIREGSignInInfo.h "$signin_secret"
  112. - name: Test objc quickstart
  113. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Config)
  114. - name: Test swift quickstart
  115. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Config swift)
  116. remoteconfig-cron-only:
  117. # Don't run on private repo.
  118. if: github.event_name == 'schedule' && github.repository != 'FirebasePrivate/firebase-ios-sdk'
  119. runs-on: macos-latest
  120. strategy:
  121. matrix:
  122. target: [ios, tvos, macos]
  123. flags: [
  124. '--skip-tests --use-modular-headers',
  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 }}