installations.yml 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. name: installations
  2. permissions:
  3. contents: read
  4. on:
  5. workflow_dispatch:
  6. pull_request:
  7. paths:
  8. - 'FirebaseInstallations**'
  9. - '.github/workflows/installations.yml'
  10. - '.github/workflows/common.yml'
  11. - '.github/workflows/common_cocoapods.yml'
  12. - '.github/workflows/common_catalyst.yml'
  13. - '.github/workflows/common_quickstart.yml'
  14. - 'Gemfile*'
  15. schedule:
  16. # Run every day at 11pm (PDT) / 2am (EDT) - cron uses UTC times
  17. - cron: '0 6 * * *'
  18. concurrency:
  19. group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
  20. cancel-in-progress: true
  21. jobs:
  22. spm:
  23. uses: ./.github/workflows/common.yml
  24. with:
  25. target: FirebaseInstallations
  26. buildonly_platforms: all
  27. catalyst:
  28. uses: ./.github/workflows/common_catalyst.yml
  29. with:
  30. product: FirebaseInstallations
  31. target: FirebaseInstallations-Unit-unit
  32. pod_lib_lint:
  33. uses: ./.github/workflows/common_cocoapods.yml
  34. with:
  35. product: FirebaseInstallations
  36. setup_command: |
  37. scripts/configure_test_keychain.sh
  38. mkdir -p FirebaseInstallations/Source/Tests/Resources
  39. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/Installations/GoogleService-Info.plist.gpg \
  40. FirebaseInstallations/Source/Tests/Resources/GoogleService-Info.plist "$plist_secret"
  41. export FIS_INTEGRATION_TESTS_REQUIRED=1
  42. secrets:
  43. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  44. quickstart:
  45. uses: ./.github/workflows/common_quickstart.yml
  46. strategy:
  47. matrix:
  48. quickstart_type: [objc, swift]
  49. with:
  50. product: Installations
  51. is_legacy: false
  52. setup_command: scripts/setup_quickstart.sh installations
  53. plist_src_path: scripts/gha-encrypted/Installations/GoogleService-Info.plist.gpg
  54. plist_dst_path: quickstart-ios/installations/GoogleService-Info.plist
  55. quickstart_type: ${{ matrix.quickstart_type }}
  56. secrets:
  57. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  58. quickstart-ftl-cron-only:
  59. # Don't run on private repo.
  60. if: github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule'
  61. runs-on: macos-15
  62. steps:
  63. - uses: actions/checkout@v4
  64. - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
  65. - uses: actions/setup-python@v5
  66. with:
  67. python-version: '3.11'
  68. - name: Xcode
  69. run: sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer
  70. - name: Setup quickstart
  71. run: scripts/setup_quickstart.sh installations
  72. - name: Copy mock plist
  73. run: cp quickstart-ios/mock-GoogleService-Info.plist quickstart-ios/installations/GoogleService-Info.plist
  74. - name: Build objc quickstart
  75. run: scripts/third_party/travis/retry.sh scripts/test_quickstart_ftl.sh Installations
  76. - name: Build swift quickstart
  77. run: scripts/third_party/travis/retry.sh scripts/test_quickstart_ftl.sh Installations swift
  78. - id: ftl_test
  79. uses: FirebaseExtended/github-actions/firebase-test-lab@v1.4
  80. with:
  81. credentials_json: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_CREDENTIALS }}
  82. testapp_dir: quickstart-ios/build-for-testing
  83. test_type: "xctest"
  84. installations-cron-only:
  85. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  86. runs-on: macos-15
  87. env:
  88. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  89. FIR_IID_INTEGRATION_TESTS_REQUIRED: ${{ secrets.GHASecretsGPGPassphrase1 }}
  90. strategy:
  91. matrix:
  92. target: [ios, tvos, macos]
  93. flags: [
  94. '--use-static-frameworks'
  95. ]
  96. needs: pod_lib_lint
  97. steps:
  98. - uses: actions/checkout@v4
  99. - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
  100. - name: Xcode
  101. run: sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer
  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 }} \