abtesting.yml 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  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. - '.github/workflows/common_catalyst.yml'
  14. - 'Gemfile*'
  15. schedule:
  16. # Run every day at 2am (PDT) / 5am (EDT) - cron uses UTC times
  17. - cron: '0 9 * * *'
  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: ABTestingUnit
  26. catalyst:
  27. uses: ./.github/workflows/common_catalyst.yml
  28. with:
  29. product: FirebaseABTesting
  30. target: FirebaseABTesting-Unit-unit
  31. pod_lib_lint:
  32. uses: ./.github/workflows/common_cocoapods.yml
  33. with:
  34. product: FirebaseABTesting
  35. quickstart:
  36. # Don't run on private repo unless it is a PR.
  37. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  38. env:
  39. plist_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.4.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. 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: Setup quickstart
  70. env:
  71. LEGACY: true
  72. run: scripts/setup_quickstart.sh abtesting
  73. - name: Install Secret GoogleService-Info.plist
  74. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-abtesting.plist.gpg \
  75. quickstart-ios/abtesting/GoogleService-Info.plist "$plist_secret"
  76. - name: Xcode
  77. run: sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer
  78. - name: Build swift quickstart
  79. env:
  80. LEGACY: true
  81. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_ftl.sh ABTesting)
  82. - id: ftl_test
  83. uses: FirebaseExtended/github-actions/firebase-test-lab@v1.4
  84. with:
  85. credentials_json: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_CREDENTIALS }}
  86. testapp_dir: quickstart-ios/build-for-testing
  87. test_type: "xctest"
  88. abtesting-cron-only:
  89. # Don't run on private repo.
  90. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  91. runs-on: macos-15
  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: Setup Bundler
  103. run: scripts/setup_bundler.sh
  104. - name: Xcode
  105. run: sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer
  106. - name: PodLibLint ABTesting Cron
  107. run: |
  108. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb \
  109. FirebaseABTesting.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }}