macos-tests.yml 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. name: Test OS X Platform
  2. on:
  3. pull_request:
  4. branches:
  5. - stable
  6. jobs:
  7. Test-OS-X-Platform:
  8. runs-on: macos-latest
  9. env:
  10. TEST_REPORTS: /tmp/test-results
  11. LANG: en_US.UTF-8
  12. steps:
  13. - uses: actions/checkout@v2
  14. - name: Create Test Result Directory
  15. run: |
  16. mkdir -p tmp/test-results/
  17. - name: Run Unit Test - macOS
  18. run: |
  19. cd XCode
  20. set -o pipefail && xcodebuild test -scheme SwifterMac -sdk macosx -destination "arch=x86_64" | xcpretty -c -r html --output $TEST_REPORTS/macOS.html
  21. - name: Run Unit Test - iOS
  22. run: |
  23. cd XCode
  24. set -o pipefail && xcodebuild test -scheme SwifteriOS -sdk iphonesimulator -destination "name=iPhone 8" | xcpretty -c -r html --output $TEST_REPORTS/iOS.html
  25. - name: Run Unit Test - tvOS
  26. run: |
  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. - name: Run Unit Test - Swift Package Manager
  30. run: |
  31. cd XCode
  32. swift build && swift test
  33. - name: Archive Test results
  34. uses: actions/upload-artifact@v1
  35. with:
  36. name: test-results
  37. path: tmp/test-results