abtesting.yml 2.4 KB

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