functions.yml 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. name: functions
  2. on:
  3. pull_request:
  4. paths:
  5. - 'Functions**'
  6. - '.github/workflows/functions.yml'
  7. - 'Interop/Auth/Public/*.h'
  8. - 'FirebaseMessaging/Sources/Interop/*.h'
  9. - 'Gemfile'
  10. schedule:
  11. # Run every day at 11pm (PST) - cron uses UTC times
  12. - cron: '0 7 * * *'
  13. jobs:
  14. pod-lib-lint:
  15. # Don't run on private repo unless it is a PR.
  16. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || 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: Integration Test Server
  26. run: Functions/Backend/start.sh synchronous
  27. - name: Build and test
  28. run: |
  29. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseFunctions.podspec \
  30. --platforms=${{ matrix.target }}
  31. spm:
  32. # Don't run on private repo unless it is a PR.
  33. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  34. runs-on: macOS-latest
  35. steps:
  36. - uses: actions/checkout@v2
  37. - name: Initialize xcodebuild
  38. run: xcodebuild -list
  39. - name: iOS Unit Tests
  40. run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseFunctions iOS spmbuildonly
  41. spm-cron:
  42. # Don't run on private repo.
  43. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  44. runs-on: macOS-latest
  45. strategy:
  46. matrix:
  47. target: [tvOS, macOS, catalyst]
  48. steps:
  49. - uses: actions/checkout@v2
  50. - name: Initialize xcodebuild
  51. run: xcodebuild -list
  52. - name: Unit Tests
  53. run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseFunctions ${{ matrix.target }} spmbuildonly
  54. catalyst:
  55. # Don't run on private repo unless it is a PR.
  56. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  57. runs-on: macOS-latest
  58. steps:
  59. - uses: actions/checkout@v2
  60. - name: Setup Bundler
  61. run: scripts/setup_bundler.sh
  62. - name: Setup project and Build for Catalyst
  63. # Only build the unit tests on Catalyst. Test stopped working when GHA moved to Xcode 11.4.1.
  64. run: scripts/test_catalyst.sh FirebaseFunctions build FirebaseFunctions-Unit-unit
  65. # Restore when FirebaseUI works with Firebase 7 (#6646)
  66. quickstart:
  67. # Don't run on private repo unless it is a PR.
  68. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  69. env:
  70. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  71. signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  72. runs-on: macOS-latest
  73. steps:
  74. - uses: actions/checkout@v2
  75. - name: Setup quickstart
  76. run: scripts/setup_quickstart.sh functions
  77. - name: install secret googleservice-info.plist
  78. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-functions.plist.gpg \
  79. quickstart-ios/functions/GoogleService-Info.plist "$plist_secret"
  80. - name: Install Secret FIREGSignInInfo.h
  81. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/FIREGSignInInfo.h.gpg \
  82. quickstart-ios/TestUtils/FIREGSignInInfo.h "$signin_secret"
  83. - name: Setup custom URL scheme
  84. run: sed -i '' 's/REVERSED_CLIENT_ID/com.googleusercontent.apps.1025801074639-6p6ebi8amuklcjrto20gvpe295smm8u6/' quickstart-ios/functions/FunctionsExample/Info.plist
  85. - name: Test objc quickstart
  86. run: ([ -z $plist_secret ] ||
  87. scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Functions)
  88. - name: Test swift quickstart
  89. run: ([ -z $plist_secret ] ||
  90. scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Functions swift)
  91. functions-cron-only:
  92. # Don't run on private repo.
  93. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  94. runs-on: macos-latest
  95. strategy:
  96. matrix:
  97. target: [ios, tvos, macos]
  98. flags: [
  99. '--use-static-frameworks',
  100. '--use-libraries'
  101. ]
  102. needs: pod-lib-lint
  103. steps:
  104. - uses: actions/checkout@v2
  105. - name: Setup Bundler
  106. run: scripts/setup_bundler.sh
  107. - name: Integration Test Server
  108. run: Functions/Backend/start.sh synchronous
  109. - name: PodLibLint Functions Cron
  110. run: |
  111. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb \
  112. FirebaseFunctions.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }}