installations.yml 3.9 KB

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