functions.yml 5.3 KB

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