installations.yml 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  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-11
  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: Configure test keychain
  26. run: scripts/configure_test_keychain.sh
  27. - name: Install GoogleService-Info.plist
  28. run: |
  29. mkdir -p FirebaseInstallations/Source/Tests/Resources
  30. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/Installations/GoogleService-Info.plist.gpg \
  31. FirebaseInstallations/Source/Tests/Resources/GoogleService-Info.plist "$plist_secret"
  32. - name: Get boolean for secrets available
  33. id: secrets
  34. run: echo "::set-output name=val::$([[ -z $plist_secret ]] && echo "0" || echo "1")"
  35. - name: Build and test
  36. run: |
  37. export FIS_INTEGRATION_TESTS_REQUIRED=${{ steps.secrets.outputs.val }}
  38. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseInstallations.podspec \
  39. --platforms=${{ matrix.target }}
  40. spm:
  41. # Don't run on private repo unless it is a PR.
  42. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  43. runs-on: macos-11
  44. strategy:
  45. matrix:
  46. target: [iOS, tvOS, macOS, catalyst, watchOS]
  47. steps:
  48. - uses: actions/checkout@v2
  49. - uses: mikehardy/buildcache-action@50738c6c77de7f34e66b870e4f8ede333b69d077
  50. with:
  51. cache_key: ${{ matrix.os }}
  52. - name: Initialize xcodebuild
  53. run: scripts/setup_spm_tests.sh
  54. - name: Unit Tests
  55. run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseInstallations ${{ matrix.target }} spmbuildonly
  56. catalyst:
  57. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  58. runs-on: macos-11
  59. steps:
  60. - uses: actions/checkout@v2
  61. - uses: mikehardy/buildcache-action@50738c6c77de7f34e66b870e4f8ede333b69d077
  62. with:
  63. cache_key: ${{ matrix.os }}
  64. - name: Setup Bundler
  65. run: scripts/setup_bundler.sh
  66. - name: Setup project and Build for Catalyst
  67. run: scripts/test_catalyst.sh FirebaseInstallations test FirebaseInstallations-Unit-unit
  68. quickstart:
  69. # Don't run on private repo unless it is a PR.
  70. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  71. runs-on: macos-11
  72. steps:
  73. - uses: actions/checkout@v2
  74. - name: Setup quickstart
  75. run: scripts/setup_quickstart.sh installations
  76. - name: Copy mock plist
  77. run: cp quickstart-ios/mock-GoogleService-Info.plist quickstart-ios/installations/GoogleService-Info.plist
  78. - name: Test objc quickstart
  79. run: scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Installations true
  80. - name: Test swift quickstart
  81. run: scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Installations true swift
  82. installations-cron-only:
  83. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  84. runs-on: macos-11
  85. env:
  86. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  87. FIR_IID_INTEGRATION_TESTS_REQUIRED: ${{ secrets.GHASecretsGPGPassphrase1 }}
  88. strategy:
  89. matrix:
  90. target: [ios, tvos, macos]
  91. flags: [
  92. '--use-static-frameworks'
  93. ]
  94. needs: pod-lib-lint
  95. steps:
  96. - uses: actions/checkout@v2
  97. - name: Setup Bundler
  98. run: scripts/setup_bundler.sh
  99. - name: Configure test keychain
  100. run: scripts/configure_test_keychain.sh
  101. - name: Install GoogleService-Info.plist
  102. run: |
  103. mkdir -p FirebaseInstallations/Source/Tests/Resources
  104. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/Installations/GoogleService-Info.plist.gpg \
  105. FirebaseInstallations/Source/Tests/Resources/GoogleService-Info.plist "$plist_secret"
  106. - name: Get boolean for secrets available
  107. id: secrets
  108. run: echo "::set-output name=val::$([[ -z $plist_secret ]] && echo "0" || echo "1")"
  109. - name: PodLibLint Installations Cron
  110. run: |
  111. export FIS_INTEGRATION_TESTS_REQUIRED=${{ steps.secrets.outputs.val }}
  112. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseInstallations.podspec \
  113. --platforms=${{ matrix.target }} ${{ matrix.flags }} \