tests.yml 1.8 KB

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