tests.yml 1.8 KB

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