tests.yml 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. name: tests
  2. on:
  3. push:
  4. branches:
  5. - main
  6. pull_request:
  7. branches:
  8. - main
  9. workflow_dispatch:
  10. jobs:
  11. pod-lib-lint:
  12. runs-on: macOS-latest
  13. strategy:
  14. matrix:
  15. podspec: [GoogleSignIn.podspec, GoogleSignInSwift.podspec]
  16. flag: [
  17. "",
  18. "--use-libraries",
  19. "--use-static-frameworks"
  20. ]
  21. include:
  22. - podspec: GoogleSignInSwift.podspec
  23. includePodspecFlag: "--include-podspecs='GoogleSignIn.podspec'"
  24. steps:
  25. - uses: actions/checkout@v2
  26. - name: Update Bundler
  27. run: bundle update --bundler
  28. - name: Install Ruby gems with Bundler
  29. run: bundle install
  30. - name: Lint podspec using local source
  31. run: |
  32. pod lib lint ${{ matrix.podspec }} --verbose \
  33. ${{ matrix.includePodspecFlag }} ${{ matrix.flag }}
  34. spm-build-test:
  35. runs-on: macOS-latest
  36. strategy:
  37. matrix:
  38. sdk: ['macosx', 'iphonesimulator']
  39. include:
  40. - sdk: 'macosx'
  41. destination: '"platform=OS X,arch=x86_64"'
  42. - sdk: 'iphonesimulator'
  43. destination: '"platform=iOS Simulator,name=iPhone 11"'
  44. steps:
  45. - uses: actions/checkout@v2
  46. - name: Build unit test target
  47. run: |
  48. xcodebuild \
  49. -scheme GoogleSignIn-Package \
  50. -sdk ${{ matrix.sdk }} \
  51. -destination ${{ matrix.destination }} \
  52. build-for-testing
  53. - name: Run unit test target
  54. run: |
  55. xcodebuild \
  56. -scheme GoogleSignIn-Package \
  57. -sdk ${{ matrix.sdk }} \
  58. -destination ${{ matrix.destination }} \
  59. test-without-building