unit_tests.yml 1.7 KB

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