config.yml 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. version: 2
  2. jobs:
  3. macos:
  4. environment:
  5. TEST_REPORTS: /tmp/test-results
  6. LANG: en_US.UTF-8
  7. macos:
  8. xcode: 10.2.0
  9. steps:
  10. - checkout
  11. - run:
  12. name: Create Test Result Directory
  13. command: mkdir -p $TEST_REPORTS
  14. - run:
  15. name: Run Unit Test - macOS
  16. command: |
  17. cd XCode
  18. set -o pipefail && xcodebuild test -scheme SwifterMac -sdk macosx -destination "arch=x86_64" | xcpretty -c -r html --output $TEST_REPORTS/macOS.html
  19. - run:
  20. name: Run Unit Test - iOS
  21. command: |
  22. cd XCode
  23. set -o pipefail && xcodebuild test -scheme SwifteriOS -sdk iphonesimulator -destination "name=iPhone 8" | xcpretty -c -r html --output $TEST_REPORTS/iOS.html
  24. - run:
  25. name: Run Unit Test - tvOS
  26. command: |
  27. cd XCode
  28. 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
  29. - run:
  30. name: Run Unit Test - Swift Package Manager
  31. command: |
  32. cd XCode
  33. swift build && swift test
  34. - store_artifacts:
  35. path: /tmp/test-results
  36. linux:
  37. docker:
  38. - image: swift:4.2
  39. steps:
  40. - checkout
  41. - run:
  42. name: Compile code
  43. command: swift build
  44. - run:
  45. name: Run Unit Tests
  46. command: swift test
  47. workflows:
  48. version: 2
  49. tests:
  50. jobs:
  51. - linux
  52. - macos