installations.yml 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. name: installations
  2. on:
  3. pull_request:
  4. paths:
  5. - 'FirebaseInstallations**'
  6. - '.github/workflows/installations.yml'
  7. - 'Gemfile*'
  8. schedule:
  9. # Run every day at 10pm (PST) - cron uses UTC times
  10. - cron: '0 6 * * *'
  11. jobs:
  12. pod-lib-lint:
  13. # Don't run on private repo unless it is a PR.
  14. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  15. runs-on: macos-11
  16. env:
  17. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  18. strategy:
  19. matrix:
  20. target: [ios, tvos, macos]
  21. steps:
  22. - uses: actions/checkout@v2
  23. - name: Setup Bundler
  24. run: scripts/setup_bundler.sh
  25. - name: Configure test keychain
  26. run: scripts/configure_test_keychain.sh
  27. - name: Install GoogleService-Info.plist
  28. run: |
  29. mkdir -p FirebaseInstallations/Source/Tests/Resources
  30. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/Installations/GoogleService-Info.plist.gpg \
  31. FirebaseInstallations/Source/Tests/Resources/GoogleService-Info.plist "$plist_secret"
  32. - name: Get boolean for secrets available
  33. id: secrets
  34. run: echo "::set-output name=val::$([[ -z $plist_secret ]] && echo "0" || echo "1")"
  35. - name: Build and test
  36. run: |
  37. export FIS_INTEGRATION_TESTS_REQUIRED=${{ steps.secrets.outputs.val }}
  38. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseInstallations.podspec \
  39. --platforms=${{ matrix.target }}
  40. spm:
  41. # Don't run on private repo unless it is a PR.
  42. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  43. runs-on: macos-11
  44. steps:
  45. - uses: actions/checkout@v2
  46. - uses: mikehardy/buildcache-action@50738c6c77de7f34e66b870e4f8ede333b69d077
  47. with:
  48. cache_key: ${{ matrix.os }}
  49. - name: Initialize xcodebuild
  50. run: scripts/setup_spm_tests.sh
  51. - name: iOS Unit Tests
  52. run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseInstallations iOS spmbuildonly
  53. spm-cron:
  54. # Don't run on private repo.
  55. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  56. runs-on: macos-11
  57. strategy:
  58. matrix:
  59. target: [tvOS, macOS, catalyst]
  60. steps:
  61. - uses: actions/checkout@v2
  62. - uses: mikehardy/buildcache-action@50738c6c77de7f34e66b870e4f8ede333b69d077
  63. with:
  64. cache_key: ${{ matrix.os }}
  65. - name: Initialize xcodebuild
  66. run: scripts/setup_spm_tests.sh
  67. - name: Unit Tests
  68. run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseInstallations ${{ matrix.target }} spmbuildonly
  69. catalyst:
  70. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  71. runs-on: macos-11
  72. steps:
  73. - uses: actions/checkout@v2
  74. - uses: mikehardy/buildcache-action@50738c6c77de7f34e66b870e4f8ede333b69d077
  75. with:
  76. cache_key: ${{ matrix.os }}
  77. - name: Setup Bundler
  78. run: scripts/setup_bundler.sh
  79. - name: Setup project and Build for Catalyst
  80. run: scripts/test_catalyst.sh FirebaseInstallations test FirebaseInstallations-Unit-unit
  81. quickstart:
  82. # Don't run on private repo unless it is a PR.
  83. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  84. runs-on: macos-11
  85. steps:
  86. - uses: actions/checkout@v2
  87. - name: Setup quickstart
  88. run: scripts/setup_quickstart.sh installations
  89. - name: Copy mock plist
  90. run: cp quickstart-ios/mock-GoogleService-Info.plist quickstart-ios/installations/GoogleService-Info.plist
  91. - name: Test objc quickstart
  92. run: scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Installations true
  93. - name: Test swift quickstart
  94. run: scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Installations true swift
  95. installations-cron-only:
  96. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  97. runs-on: macos-11
  98. env:
  99. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  100. FIR_IID_INTEGRATION_TESTS_REQUIRED: ${{ secrets.GHASecretsGPGPassphrase1 }}
  101. strategy:
  102. matrix:
  103. target: [ios, tvos, macos]
  104. flags: [
  105. '--use-static-frameworks',
  106. '--use-libraries --skip-tests'
  107. ]
  108. needs: pod-lib-lint
  109. steps:
  110. - uses: actions/checkout@v2
  111. - name: Setup Bundler
  112. run: scripts/setup_bundler.sh
  113. - name: Configure test keychain
  114. run: scripts/configure_test_keychain.sh
  115. - name: Install GoogleService-Info.plist
  116. run: |
  117. mkdir -p FirebaseInstallations/Source/Tests/Resources
  118. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/Installations/GoogleService-Info.plist.gpg \
  119. FirebaseInstallations/Source/Tests/Resources/GoogleService-Info.plist "$plist_secret"
  120. - name: Get boolean for secrets available
  121. id: secrets
  122. run: echo "::set-output name=val::$([[ -z $plist_secret ]] && echo "0" || echo "1")"
  123. - name: PodLibLint Installations Cron
  124. run: |
  125. export FIS_INTEGRATION_TESTS_REQUIRED=${{ steps.secrets.outputs.val }}
  126. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseInstallations.podspec \
  127. --platforms=${{ matrix.target }} ${{ matrix.flags }} \
  128. podspec-presubmit:
  129. # Don't run on private repo unless it is a PR.
  130. if: github.repository == 'Firebase/firebase-ios-sdk' && github.event.pull_request.merged != true && github.event.action != 'closed'
  131. runs-on: macos-11
  132. steps:
  133. - uses: actions/checkout@v2
  134. - name: Setup Bundler
  135. run: scripts/setup_bundler.sh
  136. - name: Build and test
  137. run: scripts/third_party/travis/retry.sh pod spec lint FirebaseInstallations.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/'