abtesting.yml 2.9 KB

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