| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182 |
- version: 2
- jobs:
- Danger:
- macos:
- xcode: 10.2.0
- steps:
- - checkout
- - run:
- name: Set Ruby Version
- command: echo "ruby-2.4" > ~/.ruby-version
- - restore_cache:
- key: 1-gems-{{ checksum "Gemfile.lock" }}
- - run:
- name: Install Ruby Dependencies
- command: bundle check || bundle install
- environment:
- BUNDLE_JOBS: 4
- BUNDLE_RETRY: 3
- - save_cache:
- key: 1-gems-{{ checksum "Gemfile.lock" }}
- paths:
- - vendor/bundle
- - run:
- name: Danger
- command: bundle exec danger
- Test OS X Platform:
- environment:
- TEST_REPORTS: /tmp/test-results
- LANG: en_US.UTF-8
- macos:
- xcode: 10.2.0
- steps:
- - checkout
- - run:
- name: Create Test Result Directory
- command: mkdir -p $TEST_REPORTS
- - run:
- name: Run Unit Test - macOS
- command: |
- cd XCode
- set -o pipefail && xcodebuild test -scheme SwifterMac -sdk macosx -destination "arch=x86_64" | xcpretty -c -r html --output $TEST_REPORTS/macOS.html
- - run:
- name: Run Unit Test - iOS
- command: |
- cd XCode
- set -o pipefail && xcodebuild test -scheme SwifteriOS -sdk iphonesimulator -destination "name=iPhone 8" | xcpretty -c -r html --output $TEST_REPORTS/iOS.html
- - run:
- name: Run Unit Test - tvOS
- command: |
- cd XCode
- 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
- - run:
- name: Run Unit Test - Swift Package Manager
- command: |
- cd XCode
- swift build && swift test
- - store_artifacts:
- path: /tmp/test-results
- Test Linux Platform:
- docker:
- - image: swift:5.0
- steps:
- - checkout
- - run:
- name: Run Unit Tests
- command: swift test
- workflows:
- version: 2
- tests:
- jobs:
- - Danger
- - Test Linux Platform:
- requires:
- - Danger
- - Test OS X Platform:
- requires:
- - Danger
|