functions.yml 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  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 FunctionsUnit iOS spm
  44. - name: Integration Test Server
  45. run: FirebaseFunctions/Backend/start.sh synchronous
  46. - name: iOS Swift Integration Tests (Objective C library)
  47. run: scripts/third_party/travis/retry.sh ./scripts/build.sh FunctionsSwiftIntegration iOS spm
  48. - name: iOS Swift Integration Tests (including Swift library)
  49. run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseFunctionsSwiftUnit iOS spm
  50. - name: iOS Objective C Integration Tests
  51. run: scripts/third_party/travis/retry.sh ./scripts/build.sh FunctionsIntegration iOS spm
  52. - name: Combine Unit Tests
  53. run: scripts/third_party/travis/retry.sh ./scripts/build.sh FunctionsCombineUnit iOS spm
  54. spm-cron:
  55. # Don't run on private repo.
  56. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  57. runs-on: macos-11
  58. strategy:
  59. matrix:
  60. target: [tvOS, macOS, catalyst]
  61. steps:
  62. - uses: actions/checkout@v2
  63. - name: Initialize xcodebuild
  64. run: scripts/setup_spm_tests.sh
  65. - name: Unit Tests
  66. run: scripts/third_party/travis/retry.sh ./scripts/build.sh FunctionsUnit ${{ matrix.target }} spm
  67. catalyst:
  68. # Don't run on private repo unless it is a PR.
  69. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  70. runs-on: macos-11
  71. steps:
  72. - uses: actions/checkout@v2
  73. - name: Setup Bundler
  74. run: scripts/setup_bundler.sh
  75. - name: Setup project and Build for Catalyst
  76. run: scripts/test_catalyst.sh FirebaseFunctions test FirebaseFunctions-Unit-unit
  77. # Restore when FirebaseUI works with Firebase 7 (#6646)
  78. quickstart:
  79. # Don't run on private repo unless it is a PR.
  80. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  81. env:
  82. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  83. signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  84. runs-on: macos-11
  85. steps:
  86. - uses: actions/checkout@v2
  87. - name: Setup quickstart
  88. run: scripts/setup_quickstart.sh functions
  89. - name: install secret googleservice-info.plist
  90. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-functions.plist.gpg \
  91. quickstart-ios/functions/GoogleService-Info.plist "$plist_secret"
  92. - name: Setup custom URL scheme
  93. run: sed -i '' 's/REVERSED_CLIENT_ID/com.googleusercontent.apps.1025801074639-6p6ebi8amuklcjrto20gvpe295smm8u6/' quickstart-ios/functions/FunctionsExample/Info.plist
  94. - name: Test objc quickstart
  95. run: ([ -z $plist_secret ] ||
  96. scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Functions true)
  97. - name: Test swift quickstart
  98. run: ([ -z $plist_secret ] ||
  99. scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Functions true swift)
  100. functions-cron-only:
  101. # Don't run on private repo.
  102. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  103. runs-on: macos-11
  104. strategy:
  105. matrix:
  106. target: [ios, tvos, macos]
  107. flags: [
  108. '--use-static-frameworks',
  109. '--use-libraries --skip-tests'
  110. ]
  111. needs: pod-lib-lint
  112. steps:
  113. - uses: actions/checkout@v2
  114. - name: Setup Bundler
  115. run: scripts/setup_bundler.sh
  116. - name: Integration Test Server
  117. run: FirebaseFunctions/Backend/start.sh synchronous
  118. - name: PodLibLint Functions Cron
  119. run: |
  120. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb \
  121. FirebaseFunctions.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }}
  122. #TODO - reenable once there's a tag with the new directory structure. See #8918 and #8299
  123. # podspec-presubmit:
  124. # Don't run on private repo unless it is a PR.
  125. # if: github.repository == 'Firebase/firebase-ios-sdk' && github.event.pull_request.merged != true && github.event.action != 'closed'
  126. # runs-on: macos-11
  127. # steps:
  128. # - uses: actions/checkout@v2
  129. # - name: Setup Bundler
  130. # run: scripts/setup_bundler.sh
  131. # - name: Build and test
  132. # 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/'