abtesting.yml 3.0 KB

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