installations.yml 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. name: installations
  2. on:
  3. pull_request:
  4. paths:
  5. - 'FirebaseInstallations**'
  6. - '.github/workflows/installations.yml'
  7. - 'Gemfile*'
  8. schedule:
  9. # Run every day at 10pm (PST) - cron uses UTC times
  10. - cron: '0 6 * * *'
  11. jobs:
  12. pod-lib-lint:
  13. # Don't run on private repo unless it is a PR.
  14. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  15. runs-on: macOS-latest
  16. env:
  17. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  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: Install GoogleService-Info.plist
  26. run: |
  27. mkdir -p FirebaseInstallations/Source/Tests/Resources
  28. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/Installations/GoogleService-Info.plist.gpg \
  29. FirebaseInstallations/Source/Tests/Resources/GoogleService-Info.plist "$plist_secret"
  30. - name: Get boolean for secrets available
  31. id: secrets
  32. run: echo "::set-output name=val::$([[ -z $plist_secret ]] && echo "0" || echo "1")"
  33. - name: Build and test
  34. run: |
  35. export FIS_INTEGRATION_TESTS_REQUIRED=${{ steps.secrets.outputs.val }}
  36. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseInstallations.podspec \
  37. --platforms=${{ matrix.target }}
  38. spm:
  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-latest
  42. steps:
  43. - uses: actions/checkout@v2
  44. - name: Initialize xcodebuild
  45. run: scripts/setup_spm_tests.sh
  46. - name: iOS Unit Tests
  47. run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseInstallations iOS spmbuildonly
  48. spm-cron:
  49. # Don't run on private repo.
  50. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  51. runs-on: macOS-latest
  52. strategy:
  53. matrix:
  54. target: [tvOS, macOS, catalyst]
  55. steps:
  56. - uses: actions/checkout@v2
  57. - name: Initialize xcodebuild
  58. run: scripts/setup_spm_tests.sh
  59. - name: Unit Tests
  60. run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseInstallations ${{ matrix.target }} spmbuildonly
  61. catalyst:
  62. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  63. runs-on: macOS-latest
  64. steps:
  65. - uses: actions/checkout@v2
  66. - name: Setup Bundler
  67. run: scripts/setup_bundler.sh
  68. - name: Setup project and Build for Catalyst
  69. run: scripts/test_catalyst.sh FirebaseInstallations test FirebaseInstallations-Unit-unit
  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. runs-on: macOS-latest
  74. steps:
  75. - uses: actions/checkout@v2
  76. - name: Setup quickstart
  77. run: scripts/setup_quickstart.sh installations
  78. - name: Copy mock plist
  79. run: cp quickstart-ios/mock-GoogleService-Info.plist quickstart-ios/installations/GoogleService-Info.plist
  80. - name: Test objc quickstart
  81. run: scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Installations
  82. - name: Test swift quickstart
  83. run: scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Installations swift
  84. installations-cron-only:
  85. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  86. runs-on: macos-latest
  87. env:
  88. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  89. FIR_IID_INTEGRATION_TESTS_REQUIRED: ${{ secrets.GHASecretsGPGPassphrase1 }}
  90. strategy:
  91. matrix:
  92. target: [ios, tvos, macos]
  93. flags: [
  94. '--use-static-frameworks',
  95. '--use-libraries'
  96. ]
  97. needs: pod-lib-lint
  98. steps:
  99. - uses: actions/checkout@v2
  100. - name: Setup Bundler
  101. run: scripts/setup_bundler.sh
  102. - name: Install GoogleService-Info.plist
  103. run: |
  104. mkdir -p FirebaseInstallations/Source/Tests/Resources
  105. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/Installations/GoogleService-Info.plist.gpg \
  106. FirebaseInstallations/Source/Tests/Resources/GoogleService-Info.plist "$plist_secret"
  107. - name: Get boolean for secrets available
  108. id: secrets
  109. run: echo "::set-output name=val::$([[ -z $plist_secret ]] && echo "0" || echo "1")"
  110. - name: PodLibLint Installations Cron
  111. run: |
  112. export FIS_INTEGRATION_TESTS_REQUIRED=${{ steps.secrets.outputs.val }}
  113. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseInstallations.podspec \
  114. --platforms=${{ matrix.target }} ${{ matrix.flags }} \
  115. podspec-presubmit:
  116. # Don't run on private repo unless it is a PR.
  117. if: github.repository == 'Firebase/firebase-ios-sdk' && github.event.pull_request.merged != true && github.event.action != 'closed'
  118. runs-on: macOS-latest
  119. steps:
  120. - uses: actions/checkout@v2
  121. - name: Setup Bundler
  122. run: scripts/setup_bundler.sh
  123. - name: Build and test
  124. run: scripts/third_party/travis/retry.sh pod spec lint FirebaseInstallations.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/'