functions.yml 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. name: functions
  2. on:
  3. pull_request:
  4. paths:
  5. - 'FirebaseFunctions**'
  6. - 'FirebaseSharedSwift**'
  7. - '.github/workflows/functions.yml'
  8. - 'FirebaseAuth/Interop/*.h'
  9. - 'FirebaseMessaging/Interop/*.h'
  10. - 'FirebaseTestingSupport/Functions/**'
  11. - 'FirebaseCombineSwift/Sources/Functions/**'
  12. - 'scripts/setup_quickstart.sh'
  13. - 'Gemfile*'
  14. schedule:
  15. # Run every day at 1am (PST) - cron uses UTC times
  16. - cron: '0 9 * * *'
  17. concurrency:
  18. group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
  19. cancel-in-progress: true
  20. jobs:
  21. pod-lib-lint:
  22. # Don't run on private repo unless it is a PR.
  23. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  24. runs-on: macos-12
  25. strategy:
  26. matrix:
  27. target: [ios, tvos, macos, watchos]
  28. steps:
  29. - uses: actions/checkout@v2
  30. - uses: ruby/setup-ruby@v1
  31. - name: Setup Bundler
  32. run: scripts/setup_bundler.sh
  33. - name: Integration Test Server
  34. run: FirebaseFunctions/Backend/start.sh synchronous
  35. - name: Build and test
  36. run: |
  37. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseFunctions.podspec --platforms=${{ matrix.target }}
  38. spm-integration:
  39. # Don't run on private repo unless it is a PR.
  40. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  41. runs-on: macos-12
  42. env:
  43. FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1
  44. steps:
  45. - uses: actions/checkout@v2
  46. - uses: mikehardy/buildcache-action@50738c6c77de7f34e66b870e4f8ede333b69d077
  47. with:
  48. cache_key: ${{ matrix.os }}
  49. - name: Initialize xcodebuild
  50. run: scripts/setup_spm_tests.sh
  51. - name: Integration Test Server
  52. run: FirebaseFunctions/Backend/start.sh synchronous
  53. - name: Functions Unit Tests
  54. run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseFunctionsUnit iOS spm
  55. - name: iOS Swift Integration Tests (including Swift library)
  56. run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseFunctionsIntegration iOS spm
  57. - name: iOS ObjC Integration Tests (using Swift library)
  58. run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseFunctionsObjCIntegration iOS spm
  59. - name: Combine Unit Tests
  60. run: scripts/third_party/travis/retry.sh ./scripts/build.sh FunctionsCombineUnit iOS spm
  61. spm-unit:
  62. # Don't run on private repo.
  63. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  64. runs-on: macos-12
  65. strategy:
  66. matrix:
  67. target: [iOS, tvOS, macOS, catalyst, watchOS]
  68. steps:
  69. - uses: actions/checkout@v2
  70. - uses: mikehardy/buildcache-action@50738c6c77de7f34e66b870e4f8ede333b69d077
  71. with:
  72. cache_key: ${{ matrix.os }}
  73. - name: Initialize xcodebuild
  74. run: scripts/setup_spm_tests.sh
  75. - name: Unit Tests
  76. run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseFunctionsUnit ${{ matrix.target }} spm
  77. quickstart:
  78. # Don't run on private repo unless it is a PR.
  79. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  80. env:
  81. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  82. signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  83. LEGACY: true
  84. runs-on: macos-12
  85. steps:
  86. - uses: actions/checkout@v2
  87. - uses: actions/checkout@v2
  88. - uses: ruby/setup-ruby@v1
  89. - name: Setup quickstart
  90. run: scripts/setup_quickstart.sh functions
  91. - name: install secret googleservice-info.plist
  92. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-functions.plist.gpg \
  93. quickstart-ios/functions/GoogleService-Info.plist "$plist_secret"
  94. - name: Setup custom URL scheme
  95. run: sed -i '' 's/REVERSED_CLIENT_ID/com.googleusercontent.apps.1025801074639-6p6ebi8amuklcjrto20gvpe295smm8u6/' quickstart-ios/functions/LegacyFunctionsQuickstart/FunctionsExample/Info.plist
  96. - name: Test objc quickstart
  97. run: ([ -z $plist_secret ] ||
  98. scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Functions true)
  99. - name: Test swift quickstart
  100. run: ([ -z $plist_secret ] ||
  101. scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Functions true swift)
  102. functions-cron-only:
  103. # Don't run on private repo.
  104. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  105. runs-on: macos-12
  106. strategy:
  107. matrix:
  108. target: [ios, tvos, macos]
  109. flags: [
  110. '--use-static-frameworks',
  111. ]
  112. needs: pod-lib-lint
  113. steps:
  114. - uses: actions/checkout@v2
  115. - uses: ruby/setup-ruby@v1
  116. - name: Setup Bundler
  117. run: scripts/setup_bundler.sh
  118. - name: Integration Test Server
  119. run: FirebaseFunctions/Backend/start.sh synchronous
  120. - name: PodLibLint Functions Cron
  121. run: |
  122. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb \
  123. FirebaseFunctions.podspec --platforms=${{ matrix.target }} --use-static-frameworks