installations.yml 5.3 KB

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