abtesting.yml 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  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 3am (PST) - cron uses UTC times
  11. # This is set to 3 hours after zip workflow finishes so zip testing can run after.
  12. - cron: '0 11 * * *'
  13. jobs:
  14. pod-lib-lint:
  15. # Don't run on private repo unless it is a PR.
  16. if: github.repository != 'FirebasePrivate/firebase-ios-sdk' || github.event_name == 'pull_request'
  17. runs-on: macOS-latest
  18. strategy:
  19. matrix:
  20. target: [ios, tvos, macos]
  21. steps:
  22. - uses: actions/checkout@v2
  23. - name: Setup Bundler
  24. run: scripts/setup_bundler.sh
  25. - name: Build and test
  26. run: |
  27. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseABTesting.podspec \
  28. --platforms=${{ matrix.target }}
  29. catalyst:
  30. # Don't run on private repo unless it is a PR.
  31. if: github.repository != 'FirebasePrivate/firebase-ios-sdk' || github.event_name == 'pull_request'
  32. runs-on: macOS-latest
  33. steps:
  34. - uses: actions/checkout@v2
  35. - name: Setup Bundler
  36. run: scripts/setup_bundler.sh
  37. - name: Setup project and Build for Catalyst
  38. # Only build the unit tests on Catalyst. Test stopped working when GHA moved to Xcode 11.4.1.
  39. run: scripts/test_catalyst.sh FirebaseABTesting build FirebaseABTesting-Unit-unit
  40. quickstart:
  41. # Don't run on private repo unless it is a PR.
  42. if: github.repository != 'FirebasePrivate/firebase-ios-sdk' || github.event_name == 'pull_request'
  43. env:
  44. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  45. signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  46. runs-on: macOS-latest
  47. steps:
  48. - uses: actions/checkout@v2
  49. - name: Setup quickstart
  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: Install Secret FIREGSignInInfo.h
  55. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/FIREGSignInInfo.h.gpg \
  56. quickstart-ios/TestUtils/FIREGSignInInfo.h "$signin_secret"
  57. - name: Test swift quickstart
  58. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh ABTesting)
  59. abtesting-cron-only:
  60. # Don't run on private repo.
  61. if: github.event_name == 'schedule' && github.repository != 'FirebasePrivate/firebase-ios-sdk'
  62. runs-on: macos-latest
  63. strategy:
  64. matrix:
  65. target: [ios, tvos, macos]
  66. flags: [
  67. '--use-modular-headers',
  68. '--use-libraries'
  69. ]
  70. needs: pod-lib-lint
  71. steps:
  72. - uses: actions/checkout@v2
  73. - name: Setup Bundler
  74. run: scripts/setup_bundler.sh
  75. - name: PodLibLint ABTesting Cron
  76. run: |
  77. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb \
  78. FirebaseABTesting.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }}