functions.yml 4.5 KB

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