abtesting.yml 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  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-latest
  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-latest
  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-latest
  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-latest
  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-latest
  68. steps:
  69. - uses: actions/checkout@v2
  70. - name: Setup quickstart
  71. run: scripts/setup_quickstart.sh abtesting
  72. - name: Install Secret GoogleService-Info.plist
  73. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-abtesting.plist.gpg \
  74. quickstart-ios/abtesting/GoogleService-Info.plist "$plist_secret"
  75. - name: Install Secret FIREGSignInInfo.h
  76. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/FIREGSignInInfo.h.gpg \
  77. quickstart-ios/TestUtils/FIREGSignInInfo.h "$signin_secret"
  78. - name: Test swift quickstart
  79. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh ABTesting)
  80. abtesting-cron-only:
  81. # Don't run on private repo.
  82. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  83. runs-on: macos-latest
  84. strategy:
  85. matrix:
  86. target: [ios, tvos, macos]
  87. flags: [
  88. '--use-static-frameworks',
  89. '--use-libraries'
  90. ]
  91. needs: pod-lib-lint
  92. steps:
  93. - uses: actions/checkout@v2
  94. - name: Setup Bundler
  95. run: scripts/setup_bundler.sh
  96. - name: PodLibLint ABTesting Cron
  97. run: |
  98. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb \
  99. FirebaseABTesting.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }}
  100. podspec-presubmit:
  101. # Don't run on private repo unless it is a PR.
  102. if: github.repository == 'Firebase/firebase-ios-sdk' && github.event.pull_request.merged != true && github.event.action != 'closed'
  103. runs-on: macOS-latest
  104. steps:
  105. - uses: actions/checkout@v2
  106. - name: Setup Bundler
  107. run: scripts/setup_bundler.sh
  108. - name: Build and test
  109. 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/'