installations.yml 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  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. - name: Initialize xcodebuild
  47. run: scripts/setup_spm_tests.sh
  48. - name: iOS Unit Tests
  49. run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseInstallations iOS spmbuildonly
  50. spm-cron:
  51. # Don't run on private repo.
  52. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  53. runs-on: macos-11
  54. strategy:
  55. matrix:
  56. target: [tvOS, macOS, catalyst]
  57. steps:
  58. - uses: actions/checkout@v2
  59. - name: Initialize xcodebuild
  60. run: scripts/setup_spm_tests.sh
  61. - name: Unit Tests
  62. run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseInstallations ${{ matrix.target }} spmbuildonly
  63. catalyst:
  64. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  65. runs-on: macos-11
  66. steps:
  67. - uses: actions/checkout@v2
  68. - name: Setup Bundler
  69. run: scripts/setup_bundler.sh
  70. - name: Setup project and Build for Catalyst
  71. run: scripts/test_catalyst.sh FirebaseInstallations test FirebaseInstallations-Unit-unit
  72. quickstart:
  73. # Don't run on private repo unless it is a PR.
  74. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  75. runs-on: macos-11
  76. steps:
  77. - uses: actions/checkout@v2
  78. - name: Setup quickstart
  79. run: scripts/setup_quickstart.sh installations
  80. - name: Copy mock plist
  81. run: cp quickstart-ios/mock-GoogleService-Info.plist quickstart-ios/installations/GoogleService-Info.plist
  82. - name: Test objc quickstart
  83. run: scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Installations true
  84. - name: Test swift quickstart
  85. run: scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Installations true swift
  86. installations-cron-only:
  87. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  88. runs-on: macos-11
  89. env:
  90. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  91. FIR_IID_INTEGRATION_TESTS_REQUIRED: ${{ secrets.GHASecretsGPGPassphrase1 }}
  92. strategy:
  93. matrix:
  94. target: [ios, tvos, macos]
  95. flags: [
  96. '--use-static-frameworks',
  97. '--use-libraries --skip-tests'
  98. ]
  99. needs: pod-lib-lint
  100. steps:
  101. - uses: actions/checkout@v2
  102. - name: Setup Bundler
  103. run: scripts/setup_bundler.sh
  104. - name: Configure test keychain
  105. run: scripts/configure_test_keychain.sh
  106. - name: Install GoogleService-Info.plist
  107. run: |
  108. mkdir -p FirebaseInstallations/Source/Tests/Resources
  109. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/Installations/GoogleService-Info.plist.gpg \
  110. FirebaseInstallations/Source/Tests/Resources/GoogleService-Info.plist "$plist_secret"
  111. - name: Get boolean for secrets available
  112. id: secrets
  113. run: echo "::set-output name=val::$([[ -z $plist_secret ]] && echo "0" || echo "1")"
  114. - name: PodLibLint Installations Cron
  115. run: |
  116. export FIS_INTEGRATION_TESTS_REQUIRED=${{ steps.secrets.outputs.val }}
  117. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseInstallations.podspec \
  118. --platforms=${{ matrix.target }} ${{ matrix.flags }} \
  119. podspec-presubmit:
  120. # Don't run on private repo unless it is a PR.
  121. if: github.repository == 'Firebase/firebase-ios-sdk' && github.event.pull_request.merged != true && github.event.action != 'closed'
  122. runs-on: macos-11
  123. steps:
  124. - uses: actions/checkout@v2
  125. - name: Setup Bundler
  126. run: scripts/setup_bundler.sh
  127. - name: Build and test
  128. 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/'