installations.yml 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  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. - 'Gemfile*'
  14. schedule:
  15. # Run every day at 10pm (PST) - cron uses UTC times
  16. - cron: '0 6 * * *'
  17. concurrency:
  18. group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
  19. cancel-in-progress: true
  20. jobs:
  21. spm:
  22. uses: ./.github/workflows/common.yml
  23. with:
  24. target: FirebaseInstallations
  25. buildonly_platforms: all
  26. catalyst:
  27. uses: ./.github/workflows/common_catalyst.yml
  28. with:
  29. product: FirebaseInstallations
  30. target: FirebaseInstallations-Unit-unit
  31. pod_lib_lint:
  32. uses: ./.github/workflows/common_cocoapods.yml
  33. with:
  34. product: FirebaseInstallations
  35. setup_command: |
  36. scripts/configure_test_keychain.sh
  37. mkdir -p FirebaseInstallations/Source/Tests/Resources
  38. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/Installations/GoogleService-Info.plist.gpg \
  39. FirebaseInstallations/Source/Tests/Resources/GoogleService-Info.plist "$plist_secret"
  40. export FIS_INTEGRATION_TESTS_REQUIRED=1
  41. secrets:
  42. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  43. quickstart:
  44. # Don't run on private repo unless it is a PR.
  45. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  46. runs-on: macos-15
  47. steps:
  48. - uses: actions/checkout@v4
  49. - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
  50. - name: Xcode
  51. run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer
  52. - name: Setup quickstart
  53. run: scripts/setup_quickstart.sh installations
  54. - name: Copy mock plist
  55. run: cp quickstart-ios/mock-GoogleService-Info.plist quickstart-ios/installations/GoogleService-Info.plist
  56. - name: Test objc quickstart
  57. run: scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Installations true
  58. - name: Test swift quickstart
  59. run: scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Installations true swift
  60. quickstart-ftl-cron-only:
  61. # Don't run on private repo.
  62. if: github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule'
  63. runs-on: macos-15
  64. steps:
  65. - uses: actions/checkout@v4
  66. - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
  67. - uses: actions/setup-python@v5
  68. with:
  69. python-version: '3.11'
  70. - name: Xcode
  71. run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer
  72. - name: Setup quickstart
  73. run: scripts/setup_quickstart.sh installations
  74. - name: Copy mock plist
  75. run: cp quickstart-ios/mock-GoogleService-Info.plist quickstart-ios/installations/GoogleService-Info.plist
  76. - name: Build objc quickstart
  77. run: scripts/third_party/travis/retry.sh scripts/test_quickstart_ftl.sh Installations
  78. - name: Build swift quickstart
  79. run: scripts/third_party/travis/retry.sh scripts/test_quickstart_ftl.sh Installations swift
  80. - id: ftl_test
  81. uses: FirebaseExtended/github-actions/firebase-test-lab@v1.4
  82. with:
  83. credentials_json: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_CREDENTIALS }}
  84. testapp_dir: quickstart-ios/build-for-testing
  85. test_type: "xctest"
  86. installations-cron-only:
  87. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  88. runs-on: macos-15
  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. ]
  98. needs: pod_lib_lint
  99. steps:
  100. - uses: actions/checkout@v4
  101. - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
  102. - name: Xcode
  103. run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer
  104. - name: Setup Bundler
  105. run: scripts/setup_bundler.sh
  106. - name: Configure test keychain
  107. run: scripts/configure_test_keychain.sh
  108. - name: Install GoogleService-Info.plist
  109. run: |
  110. mkdir -p FirebaseInstallations/Source/Tests/Resources
  111. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/Installations/GoogleService-Info.plist.gpg \
  112. FirebaseInstallations/Source/Tests/Resources/GoogleService-Info.plist "$plist_secret"
  113. - name: Get boolean for secrets available
  114. id: secrets
  115. run: echo "::set-output name=val::$([[ -z $plist_secret ]] && echo "0" || echo "1")"
  116. - name: PodLibLint Installations Cron
  117. run: |
  118. export FIS_INTEGRATION_TESTS_REQUIRED=${{ steps.secrets.outputs.val }}
  119. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseInstallations.podspec \
  120. --platforms=${{ matrix.target }} ${{ matrix.flags }} \