tests.yml 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  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
  64. swift-button-functional-test:
  65. if: ${{ false }} # Disable integration tests while we figure out OTAs
  66. runs-on: macOS-latest
  67. defaults:
  68. run:
  69. working-directory: Samples/Swift/DaysUntilBirthday
  70. steps:
  71. - name: Checkout
  72. uses: actions/checkout@v2
  73. - name: Build test target for Google Sign-in button for Swift
  74. run: |
  75. xcodebuild \
  76. -project DaysUntilBirthday.xcodeproj \
  77. build-for-testing \
  78. -scheme DaysUntilBirthday\ \(iOS\) \
  79. -sdk iphonesimulator \
  80. -destination 'platform=iOS Simulator,name=iPhone 11'
  81. - name: Run test target for Google Sign-in button for Swift
  82. env:
  83. EMAIL_SECRET : ${{ secrets.EMAIL_SECRET }}
  84. PASSWORD_SECRET : ${{ secrets.PASSWORD_SECRET }}
  85. run: |
  86. xcodebuild \
  87. -project DaysUntilBirthday.xcodeproj \
  88. test-without-building \
  89. -scheme DaysUntilBirthday\ \(iOS\) \
  90. -sdk iphonesimulator \
  91. -destination 'platform=iOS Simulator,name=iPhone 11' \
  92. EMAIL_SECRET=$EMAIL_SECRET \
  93. PASSWORD_SECRET=$PASSWORD_SECRET