functions.yml 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  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-11
  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-11
  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-11
  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-11
  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-11
  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: 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 true)
  88. - name: Test swift quickstart
  89. run: ([ -z $plist_secret ] ||
  90. scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Functions true 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-11
  95. strategy:
  96. matrix:
  97. target: [ios, tvos, macos]
  98. flags: [
  99. '--use-static-frameworks',
  100. '--use-libraries --skip-tests'
  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 }}
  113. podspec-presubmit:
  114. # Don't run on private repo unless it is a PR.
  115. if: github.repository == 'Firebase/firebase-ios-sdk' && github.event.pull_request.merged != true && github.event.action != 'closed'
  116. runs-on: macos-11
  117. steps:
  118. - uses: actions/checkout@v2
  119. - name: Setup Bundler
  120. run: scripts/setup_bundler.sh
  121. - name: Build and test
  122. 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/'