abtesting.yml 4.0 KB

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