1
0

config.yml 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. version: 2
  2. jobs:
  3. danger:
  4. macos:
  5. xcode: 10.2.0
  6. steps:
  7. - checkout
  8. - run:
  9. name: Set Ruby Version
  10. command: echo "ruby-2.4" > ~/.ruby-version
  11. - restore_cache:
  12. key: 1-gems-{{ checksum "Gemfile.lock" }}
  13. - run:
  14. name: Install Ruby Dependencies
  15. command: bundle check || bundle install
  16. environment:
  17. BUNDLE_JOBS: 4
  18. BUNDLE_RETRY: 3
  19. - save_cache:
  20. key: 1-gems-{{ checksum "Gemfile.lock" }}
  21. paths:
  22. - vendor/bundle
  23. - run:
  24. name: Danger
  25. command: bundle exec danger
  26. macos:
  27. environment:
  28. TEST_REPORTS: /tmp/test-results
  29. LANG: en_US.UTF-8
  30. macos:
  31. xcode: 10.2.0
  32. steps:
  33. - checkout
  34. - run:
  35. name: Create Test Result Directory
  36. command: mkdir -p $TEST_REPORTS
  37. - run:
  38. name: Run Unit Test - macOS
  39. command: |
  40. cd XCode
  41. set -o pipefail && xcodebuild test -scheme SwifterMac -sdk macosx -destination "arch=x86_64" | xcpretty -c -r html --output $TEST_REPORTS/macOS.html
  42. - run:
  43. name: Run Unit Test - iOS
  44. command: |
  45. cd XCode
  46. set -o pipefail && xcodebuild test -scheme SwifteriOS -sdk iphonesimulator -destination "name=iPhone 8" | xcpretty -c -r html --output $TEST_REPORTS/iOS.html
  47. - run:
  48. name: Run Unit Test - tvOS
  49. command: |
  50. cd XCode
  51. set -o pipefail && xcodebuild test -scheme SwiftertvOS -sdk appletvsimulator -destination "name=Apple TV 4K (at 1080p)" | xcpretty -c -r html --output $TEST_REPORTS/tvOS.html
  52. - run:
  53. name: Run Unit Test - Swift Package Manager
  54. command: |
  55. cd XCode
  56. swift build && swift test
  57. - store_artifacts:
  58. path: /tmp/test-results
  59. linux:
  60. docker:
  61. - image: swift:4.2
  62. steps:
  63. - checkout
  64. - run:
  65. name: Compile code
  66. command: swift build
  67. - run:
  68. name: Run Unit Tests
  69. command: swift test
  70. workflows:
  71. version: 2
  72. tests:
  73. jobs:
  74. - danger
  75. - linux:
  76. requires:
  77. - danger
  78. - macos:
  79. requires:
  80. - danger