installations.yml 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. name: installations
  2. on:
  3. push:
  4. branches:
  5. - master
  6. pull_request:
  7. paths:
  8. - 'FirebaseInstallations**'
  9. - '.github/workflows/installations.yml'
  10. - 'Gemfile'
  11. schedule:
  12. # Run every day at 11pm (PST) - cron uses UTC times
  13. - cron: '0 7 * * *'
  14. jobs:
  15. pod-lib-lint:
  16. runs-on: macOS-latest
  17. env:
  18. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  19. strategy:
  20. matrix:
  21. target: [ios, tvos, macos]
  22. steps:
  23. - uses: actions/checkout@v2
  24. - name: Setup Bundler
  25. run: scripts/setup_bundler.sh
  26. - name: Install GoogleService-Info.plist
  27. run: |
  28. mkdir -p FirebaseInstallations/Source/Tests/Resources
  29. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/Installations/GoogleService-Info.plist.gpg \
  30. FirebaseInstallations/Source/Tests/Resources/GoogleService-Info.plist "$plist_secret"
  31. - name: Get boolean for secrets available
  32. id: secrets
  33. run: echo "::set-output name=val::$([[ -z $plist_secret ]] && echo "0" || echo "1")"
  34. - name: Build and test
  35. run: |
  36. export FIS_INTEGRATION_TESTS_REQUIRED=${{ steps.secrets.outputs.val }}
  37. export FIS_ALLOWS_INCOMPATIBLE_IID_VERSION="1"
  38. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseInstallations.podspec \
  39. --platforms=${{ matrix.target }} --ignore-local-podspecs=FirebaseInstanceID.podspec
  40. # TODO - Catalyst is disabled because `pod gen` does not have a way to get some dependent pods
  41. # from a local path and the Installations podspec requires that FirebaseInstanceID.podspec not be
  42. # the local version.
  43. #
  44. # catalyst:
  45. # runs-on: macOS-latest
  46. # steps:
  47. # - uses: actions/checkout@v2
  48. # - name: Setup Bundler
  49. # run: scripts/setup_bundler.sh
  50. # - name: Setup project and Build for Catalyst
  51. # # Only build the unit tests on Catalyst. Test stopped working when GHA moved to Xcode 11.4.1.
  52. # run: scripts/test_catalyst.sh FirebaseInstallations build FirebaseInstallations-Unit-unit
  53. quickstart:
  54. runs-on: macOS-latest
  55. steps:
  56. - uses: actions/checkout@v2
  57. - name: Setup quickstart
  58. run: scripts/setup_quickstart.sh installations
  59. - name: Copy mock plist
  60. run: cp quickstart-ios/mock-GoogleService-Info.plist quickstart-ios/installations/GoogleService-Info.plist
  61. - name: Test objc quickstart
  62. run: scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Installations
  63. - name: Test swift quickstart
  64. run: scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Installations swift
  65. installations-cron-only:
  66. runs-on: macos-latest
  67. if: github.event_name == 'schedule'
  68. env:
  69. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  70. FIR_IID_INTEGRATION_TESTS_REQUIRED: ${{ secrets.GHASecretsGPGPassphrase1 }}
  71. strategy:
  72. matrix:
  73. target: [ios, tvos, macos]
  74. flags: [
  75. '--use-modular-headers',
  76. '--use-libraries'
  77. ]
  78. needs: pod-lib-lint
  79. steps:
  80. - uses: actions/checkout@v2
  81. - name: Setup Bundler
  82. run: scripts/setup_bundler.sh
  83. - name: Install GoogleService-Info.plist
  84. run: |
  85. mkdir -p FirebaseInstallations/Source/Tests/Resources
  86. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/Installations/GoogleService-Info.plist.gpg \
  87. FirebaseInstallations/Source/Tests/Resources/GoogleService-Info.plist "$plist_secret"
  88. - name: Get boolean for secrets available
  89. id: secrets
  90. run: echo "::set-output name=val::$([[ -z $plist_secret ]] && echo "0" || echo "1")"
  91. - name: PodLibLint Installations Cron
  92. run: |
  93. export FIS_INTEGRATION_TESTS_REQUIRED=${{ steps.secrets.outputs.val }}
  94. export FIS_ALLOWS_INCOMPATIBLE_IID_VERSION="1"
  95. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseInstallations.podspec \
  96. --platforms=${{ matrix.target }} ${{ matrix.flags }} \
  97. --ignore-local-podspecs=FirebaseInstanceID.podspec