Skip to content

Commit

Permalink
Specify jobs/stages with YAML references
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxDesiatov committed Mar 30, 2019
1 parent b974a1d commit 702a1e9
Showing 1 changed file with 28 additions and 24 deletions.
52 changes: 28 additions & 24 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,36 @@
matrix:
test: &test
script:
- >
xcodebuild test -enableCodeCoverage YES -scheme XMLCoder
-sdk iphonesimulator -destination "$TEST_DEVICE" | xcpretty
- >
xcodebuild test -enableCodeCoverage YES -scheme XMLCoder
-sdk macosx | xcpretty
jobs:
include:
- osx_image: xcode10
- stage: lint
before_install:
- brew update
- brew install swiftformat
- brew outdated swiftlint || brew upgrade swiftlint
script:
- swiftformat --lint --verbose .
- swiftlint
- pod lib lint --verbose
osx_image: xcode10.2
language: swift
- <<: *test
stage: test
osx_image: xcode10
language: swift
env: TEST_DEVICE='platform=iOS Simulator,OS=12.0,name=iPhone SE'
- osx_image: xcode10.1
- <<: *test
osx_image: xcode10.1
language: swift
env: TEST_DEVICE='platform=iOS Simulator,OS=12.1,name=iPhone SE'
- osx_image: xcode10.2
- <<: *test
osx_image: xcode10.2
language: swift
env: TEST_DEVICE='platform=iOS Simulator,OS=12.2,name=iPhone SE'
after_success:
Expand All @@ -25,30 +49,10 @@ matrix:
repo: MaxDesiatov/XMLCoder
tags: true

jobs:
include:
- stage: lint
before_install:
- brew update
- brew install swiftformat
- brew outdated swiftlint || brew upgrade swiftlint
script:
- swiftformat --lint --verbose .
- swiftlint
- pod lib lint --verbose
osx_image: xcode10.2
language: swift

env:
global:
- FRAMEWORK_NAME=XMLCoder

script:
- >
xcodebuild test -enableCodeCoverage YES -scheme XMLCoder
-sdk iphonesimulator -destination "$TEST_DEVICE" | xcpretty
- xcodebuild test -enableCodeCoverage YES -scheme XMLCoder -sdk macosx | xcpretty

# this runs the tests the second time, but it's the only way to make sure
# that `Package.swift` is in a good state and `swift test` can only generate
# coverage reports in Swift 5.0, see this issue for more details:
Expand Down

0 comments on commit 702a1e9

Please sign in to comment.