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 macos: 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 linux: docker: - image: swift:4.2 steps: - checkout - run: name: Compile code command: swift build - run: name: Run Unit Tests command: swift test workflows: version: 2 tests: jobs: - danger - linux: requires: - danger - macos: requires: - danger