macos-tests.yml 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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: maxim-lobanov/setup-xcode@v1.1
  14. with:
  15. xcode-version: 12.0
  16. - uses: actions/checkout@v2
  17. - name: Create Test Result Directory
  18. run: |
  19. mkdir -p tmp/test-results/
  20. - name: Run Unit Test - macOS
  21. run: |
  22. cd XCode
  23. set -o pipefail && xcodebuild test -scheme SwifterMac -sdk macosx -destination "arch=x86_64" | xcpretty -c -r html --output $TEST_REPORTS/macOS.html
  24. - name: Run Unit Test - iOS
  25. run: |
  26. cd XCode
  27. set -o pipefail && xcodebuild test -scheme SwifteriOS -sdk iphonesimulator -destination "name=iPhone 8" | xcpretty -c -r html --output $TEST_REPORTS/iOS.html
  28. - name: Run Unit Test - tvOS
  29. run: |
  30. cd XCode
  31. 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
  32. - name: Run Unit Test - Swift Package Manager
  33. run: |
  34. cd XCode
  35. swift build && swift test
  36. - name: Archive Test results
  37. uses: actions/upload-artifact@v1
  38. with:
  39. name: test-results
  40. path: tmp/test-results