abtesting.yml 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. name: abtesting
  2. on:
  3. pull_request:
  4. paths:
  5. - 'FirebaseABTesting**'
  6. - 'Interop/Analytics/Public/*.h'
  7. - '.github/workflows/abtesting.yml'
  8. - 'Gemfile*'
  9. schedule:
  10. # Run every day at 1am(PST) - cron uses UTC times
  11. - cron: '0 9 * * *'
  12. jobs:
  13. pod-lib-lint:
  14. # Don't run on private repo unless it is a PR.
  15. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  16. runs-on: macos-11
  17. strategy:
  18. matrix:
  19. target: [ios, tvos, macos, watchos]
  20. steps:
  21. - uses: actions/checkout@v2
  22. - name: Setup Bundler
  23. run: scripts/setup_bundler.sh
  24. - name: Build and test
  25. run: |
  26. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseABTesting.podspec \
  27. --platforms=${{ matrix.target }}
  28. spm:
  29. # Don't run on private repo unless it is a PR.
  30. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  31. runs-on: macos-11
  32. steps:
  33. - uses: actions/checkout@v2
  34. - name: Initialize xcodebuild
  35. run: scripts/setup_spm_tests.sh
  36. - name: iOS Unit Tests
  37. run: scripts/third_party/travis/retry.sh ./scripts/build.sh ABTestingUnit iOS spm
  38. spm-cron:
  39. # Don't run on private repo.
  40. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  41. runs-on: macos-11
  42. strategy:
  43. matrix:
  44. target: [tvOS, macOS, catalyst]
  45. steps:
  46. - uses: actions/checkout@v2
  47. - name: Initialize xcodebuild
  48. run: scripts/setup_spm_tests.sh
  49. - name: Unit Tests
  50. run: scripts/third_party/travis/retry.sh ./scripts/build.sh ABTestingUnit ${{ matrix.target }} spm
  51. catalyst:
  52. # Don't run on private repo unless it is a PR.
  53. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  54. runs-on: macos-11
  55. steps:
  56. - uses: actions/checkout@v2
  57. - name: Setup Bundler
  58. run: scripts/setup_bundler.sh
  59. - name: Setup project and Build for Catalyst
  60. run: scripts/test_catalyst.sh FirebaseABTesting test FirebaseABTesting-Unit-unit
  61. quickstart:
  62. # Don't run on private repo unless it is a PR.
  63. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  64. env:
  65. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  66. signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  67. runs-on: macos-11
  68. steps:
  69. - uses: actions/checkout@v2
  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: Test swift quickstart
  78. env:
  79. LEGACY: true
  80. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh ABTesting true)
  81. abtesting-cron-only:
  82. # Don't run on private repo.
  83. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  84. runs-on: macos-11
  85. strategy:
  86. matrix:
  87. target: [ios, tvos, macos]
  88. flags: [
  89. '--use-static-frameworks',
  90. '--use-libraries'
  91. ]
  92. needs: pod-lib-lint
  93. steps:
  94. - uses: actions/checkout@v2
  95. - name: Setup Bundler
  96. run: scripts/setup_bundler.sh
  97. - name: PodLibLint ABTesting Cron
  98. run: |
  99. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb \
  100. FirebaseABTesting.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }}
  101. podspec-presubmit:
  102. # Don't run on private repo unless it is a PR.
  103. if: github.repository == 'Firebase/firebase-ios-sdk' && github.event.pull_request.merged != true && github.event.action != 'closed'
  104. runs-on: macos-11
  105. steps:
  106. - uses: actions/checkout@v2
  107. - name: Setup Bundler
  108. run: scripts/setup_bundler.sh
  109. - name: Build and test
  110. run: scripts/third_party/travis/retry.sh pod spec lint FirebaseABTesting.podspec --skip-tests --sources='https://github.com/firebase/SpecsTesting','https://github.com/firebase/SpecsDev.git','https://github.com/firebase/SpecsStaging.git','https://cdn.cocoapods.org/'