functions.yml 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. name: functions
  2. on:
  3. pull_request:
  4. paths:
  5. - 'FirebaseFunctions/**'
  6. - '.github/workflows/functions.yml'
  7. - 'Interop/Auth/Public/*.h'
  8. - 'FirebaseMessaging/Sources/Interop/*.h'
  9. - 'FirebaseTestingSupport/Functions/**'
  10. - 'FirebaseCombineSwift/Sources/Functions/**'
  11. - 'scripts/setup_quickstart.sh'
  12. - 'Gemfile*'
  13. schedule:
  14. # Run every day at 3am (PST) - cron uses UTC times
  15. - cron: '0 11 * * *'
  16. jobs:
  17. pod-lib-lint:
  18. # Don't run on private repo unless it is a PR.
  19. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  20. runs-on: macos-11
  21. strategy:
  22. matrix:
  23. target: [ios, tvos, macos, watchos]
  24. steps:
  25. - uses: actions/checkout@v2
  26. - name: Setup Bundler
  27. run: scripts/setup_bundler.sh
  28. - name: Integration Test Server
  29. run: FirebaseFunctions/Backend/start.sh synchronous
  30. - name: Build and test
  31. run: |
  32. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseFunctions.podspec \
  33. --platforms=${{ matrix.target }}
  34. spm:
  35. # Don't run on private repo unless it is a PR.
  36. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  37. runs-on: macos-11
  38. steps:
  39. - uses: actions/checkout@v2
  40. - name: Initialize xcodebuild
  41. run: scripts/setup_spm_tests.sh
  42. - name: iOS Unit Tests
  43. run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseFunctions iOS spmbuildonly
  44. - name: Integration Test Server
  45. run: FirebaseFunctions/Backend/start.sh synchronous
  46. - name: iOS Swift Integration Tests
  47. run: scripts/third_party/travis/retry.sh ./scripts/build.sh FunctionsSwiftIntegration iOS spm
  48. - name: iOS Objective C Integration Tests
  49. run: scripts/third_party/travis/retry.sh ./scripts/build.sh FunctionsIntegration iOS spm
  50. - name: Combine Unit Tests
  51. run: scripts/third_party/travis/retry.sh ./scripts/build.sh FunctionsCombineUnit iOS spm
  52. spm-cron:
  53. # Don't run on private repo.
  54. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  55. runs-on: macos-11
  56. strategy:
  57. matrix:
  58. target: [tvOS, macOS, catalyst]
  59. steps:
  60. - uses: actions/checkout@v2
  61. - name: Initialize xcodebuild
  62. run: scripts/setup_spm_tests.sh
  63. - name: Unit Tests
  64. run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseFunctions ${{ matrix.target }} spmbuildonly
  65. catalyst:
  66. # Don't run on private repo unless it is a PR.
  67. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  68. runs-on: macos-11
  69. steps:
  70. - uses: actions/checkout@v2
  71. - name: Setup Bundler
  72. run: scripts/setup_bundler.sh
  73. - name: Setup project and Build for Catalyst
  74. run: scripts/test_catalyst.sh FirebaseFunctions test FirebaseFunctions-Unit-unit
  75. # Restore when FirebaseUI works with Firebase 7 (#6646)
  76. quickstart:
  77. # Don't run on private repo unless it is a PR.
  78. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  79. env:
  80. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  81. signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  82. runs-on: macos-11
  83. steps:
  84. - uses: actions/checkout@v2
  85. - name: Setup quickstart
  86. run: scripts/setup_quickstart.sh functions
  87. - name: install secret googleservice-info.plist
  88. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-functions.plist.gpg \
  89. quickstart-ios/functions/GoogleService-Info.plist "$plist_secret"
  90. - name: Setup custom URL scheme
  91. run: sed -i '' 's/REVERSED_CLIENT_ID/com.googleusercontent.apps.1025801074639-6p6ebi8amuklcjrto20gvpe295smm8u6/' quickstart-ios/functions/FunctionsExample/Info.plist
  92. - name: Test objc quickstart
  93. run: ([ -z $plist_secret ] ||
  94. scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Functions true)
  95. - name: Test swift quickstart
  96. run: ([ -z $plist_secret ] ||
  97. scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Functions true swift)
  98. functions-cron-only:
  99. # Don't run on private repo.
  100. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  101. runs-on: macos-11
  102. strategy:
  103. matrix:
  104. target: [ios, tvos, macos]
  105. flags: [
  106. '--use-static-frameworks',
  107. '--use-libraries --skip-tests'
  108. ]
  109. needs: pod-lib-lint
  110. steps:
  111. - uses: actions/checkout@v2
  112. - name: Setup Bundler
  113. run: scripts/setup_bundler.sh
  114. - name: Integration Test Server
  115. run: FirebaseFunctions/Backend/start.sh synchronous
  116. - name: PodLibLint Functions Cron
  117. run: |
  118. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb \
  119. FirebaseFunctions.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }}
  120. #TODO - reenable once there's a tag with the new directory structure. See #8918 and #8299
  121. # podspec-presubmit:
  122. # Don't run on private repo unless it is a PR.
  123. # if: github.repository == 'Firebase/firebase-ios-sdk' && github.event.pull_request.merged != true && github.event.action != 'closed'
  124. # runs-on: macos-11
  125. # steps:
  126. # - uses: actions/checkout@v2
  127. # - name: Setup Bundler
  128. # run: scripts/setup_bundler.sh
  129. # - name: Build and test
  130. # run: scripts/third_party/travis/retry.sh pod spec lint FirebaseFunctions.podspec --skip-tests --sources='https://github.com/firebase/SpecsTesting','https://github.com/firebase/SpecsDev.git','https://github.com/firebase/SpecsStaging.git','https://cdn.cocoapods.org/'