functions.yml 5.2 KB

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