abtesting.yml 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. name: abtesting
  2. on:
  3. workflow_dispatch:
  4. pull_request:
  5. paths:
  6. - 'FirebaseABTesting**'
  7. - 'Interop/Analytics/Public/*.h'
  8. - '.github/workflows/abtesting.yml'
  9. - '.github/workflows/common.yml'
  10. - '.github/workflows/common_cocoapods.yml'
  11. - 'Gemfile*'
  12. schedule:
  13. # Run every day at 1am(PST) - cron uses UTC times
  14. - cron: '0 9 * * *'
  15. concurrency:
  16. group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
  17. cancel-in-progress: true
  18. jobs:
  19. spm:
  20. uses: ./.github/workflows/common.yml
  21. with:
  22. target: ABTestingUnit
  23. catalyst:
  24. uses: ./.github/workflows/common_catalyst.yml
  25. with:
  26. product: FirebaseABTesting
  27. target: FirebaseABTesting-Unit-unit
  28. pod_lib_lint:
  29. uses: ./.github/workflows/common_cocoapods.yml
  30. with:
  31. product: FirebaseABTesting
  32. quickstart:
  33. # Don't run on private repo unless it is a PR.
  34. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  35. env:
  36. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  37. signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  38. runs-on: macos-15
  39. steps:
  40. - uses: actions/checkout@v4
  41. - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
  42. - name: Xcode
  43. run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer
  44. - name: Setup quickstart
  45. env:
  46. LEGACY: true
  47. run: scripts/setup_quickstart.sh abtesting
  48. - name: Install Secret GoogleService-Info.plist
  49. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-abtesting.plist.gpg \
  50. quickstart-ios/abtesting/GoogleService-Info.plist "$plist_secret"
  51. - name: Test swift quickstart
  52. env:
  53. LEGACY: true
  54. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh ABTesting true)
  55. quickstart-ftl-cron-only:
  56. # Don't run on private repo.
  57. if: github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule'
  58. env:
  59. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  60. signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  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: Setup quickstart
  69. env:
  70. LEGACY: true
  71. run: scripts/setup_quickstart.sh abtesting
  72. - name: Install Secret GoogleService-Info.plist
  73. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-abtesting.plist.gpg \
  74. quickstart-ios/abtesting/GoogleService-Info.plist "$plist_secret"
  75. - name: Xcode
  76. run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer
  77. - name: Build swift quickstart
  78. env:
  79. LEGACY: true
  80. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_ftl.sh ABTesting)
  81. - id: ftl_test
  82. uses: FirebaseExtended/github-actions/firebase-test-lab@v1.4
  83. with:
  84. credentials_json: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_CREDENTIALS }}
  85. testapp_dir: quickstart-ios/build-for-testing
  86. test_type: "xctest"
  87. abtesting-cron-only:
  88. # Don't run on private repo.
  89. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  90. runs-on: macos-15
  91. strategy:
  92. matrix:
  93. target: [ios, tvos, macos]
  94. flags: [
  95. '--use-static-frameworks'
  96. ]
  97. needs: pod_lib_lint
  98. steps:
  99. - uses: actions/checkout@v4
  100. - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
  101. - name: Setup Bundler
  102. run: scripts/setup_bundler.sh
  103. - name: Xcode
  104. run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer
  105. - name: PodLibLint ABTesting Cron
  106. run: |
  107. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb \
  108. FirebaseABTesting.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }}