abtesting.yml 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. name: abtesting
  2. on:
  3. push:
  4. branches:
  5. - master
  6. pull_request:
  7. paths:
  8. - 'FirebaseABTesting**'
  9. - 'Interop/Analytics/Public/*.h'
  10. - '.github/workflows/abtesting.yml'
  11. - 'Gemfile'
  12. schedule:
  13. # Run every day at 11pm (PST) - cron uses UTC times
  14. - cron: '0 7 * * *'
  15. jobs:
  16. pod-lib-lint:
  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. runs-on: macOS-latest
  31. steps:
  32. - uses: actions/checkout@v2
  33. - name: Setup Bundler
  34. run: scripts/setup_bundler.sh
  35. - name: Setup project and Build for Catalyst
  36. # Only build the unit tests on Catalyst. Test stopped working when GHA moved to Xcode 11.4.1.
  37. run: scripts/test_catalyst.sh FirebaseABTesting build FirebaseABTesting-Unit-unit
  38. quickstart:
  39. env:
  40. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  41. signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  42. runs-on: macOS-latest
  43. steps:
  44. - uses: actions/checkout@v2
  45. - name: Setup quickstart
  46. run: scripts/setup_quickstart.sh abtesting
  47. - name: Install Secret GoogleService-Info.plist
  48. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-abtesting.plist.gpg \
  49. quickstart-ios/abtesting/GoogleService-Info.plist "$plist_secret"
  50. - name: Install Secret FIREGSignInInfo.h
  51. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/FIREGSignInInfo.h.gpg \
  52. quickstart-ios/TestUtils/FIREGSignInInfo.h "$signin_secret"
  53. - name: Test swift quickstart
  54. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh ABTesting)
  55. abtesting-cron-only:
  56. runs-on: macos-latest
  57. if: github.event_name == 'schedule'
  58. strategy:
  59. matrix:
  60. target: [ios, tvos, macos]
  61. flags: [
  62. '--use-modular-headers',
  63. '--use-libraries'
  64. ]
  65. needs: pod-lib-lint
  66. steps:
  67. - uses: actions/checkout@v2
  68. - name: Setup Bundler
  69. run: scripts/setup_bundler.sh
  70. - name: PodLibLint ABTesting Cron
  71. run: |
  72. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb \
  73. FirebaseABTesting.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }}