abtesting.yml 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  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 1am(PST) - 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. signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  41. runs-on: macos-15
  42. steps:
  43. - uses: actions/checkout@v4
  44. - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
  45. - name: Xcode
  46. run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer
  47. - name: Setup quickstart
  48. env:
  49. LEGACY: true
  50. run: scripts/setup_quickstart.sh abtesting
  51. - name: Install Secret GoogleService-Info.plist
  52. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-abtesting.plist.gpg \
  53. quickstart-ios/abtesting/GoogleService-Info.plist "$plist_secret"
  54. - name: Test swift quickstart
  55. env:
  56. LEGACY: true
  57. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh ABTesting true)
  58. quickstart-ftl-cron-only:
  59. # Don't run on private repo.
  60. if: github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule'
  61. env:
  62. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  63. signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  64. runs-on: macos-15
  65. steps:
  66. - uses: actions/checkout@v4
  67. - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
  68. - uses: actions/setup-python@v5
  69. with:
  70. python-version: '3.11'
  71. - name: Setup quickstart
  72. env:
  73. LEGACY: true
  74. run: scripts/setup_quickstart.sh abtesting
  75. - name: Install Secret GoogleService-Info.plist
  76. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-abtesting.plist.gpg \
  77. quickstart-ios/abtesting/GoogleService-Info.plist "$plist_secret"
  78. - name: Xcode
  79. run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer
  80. - name: Build swift quickstart
  81. env:
  82. LEGACY: true
  83. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_ftl.sh ABTesting)
  84. - id: ftl_test
  85. uses: FirebaseExtended/github-actions/firebase-test-lab@v1.4
  86. with:
  87. credentials_json: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_CREDENTIALS }}
  88. testapp_dir: quickstart-ios/build-for-testing
  89. test_type: "xctest"
  90. abtesting-cron-only:
  91. # Don't run on private repo.
  92. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  93. runs-on: macos-15
  94. strategy:
  95. matrix:
  96. target: [ios, tvos, macos]
  97. flags: [
  98. '--use-static-frameworks'
  99. ]
  100. needs: pod_lib_lint
  101. steps:
  102. - uses: actions/checkout@v4
  103. - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
  104. - name: Setup Bundler
  105. run: scripts/setup_bundler.sh
  106. - name: Xcode
  107. run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer
  108. - name: PodLibLint ABTesting Cron
  109. run: |
  110. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb \
  111. FirebaseABTesting.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }}