|
1 |
| -language: swift |
2 |
| -osx_image: xcode10.1 |
3 |
| -branches: |
4 |
| - only: |
5 |
| - - master |
6 |
| -env: |
7 |
| - matrix: |
8 |
| - - SCHEME=OptimizelySwiftSDK-iOS TEST_SDK=iphonesimulator PLATFORM='iOS Simulator' OS=9.1 NAME='iPad Air' |
9 |
| - - SCHEME=OptimizelySwiftSDK-iOS TEST_SDK=iphonesimulator PLATFORM='iOS Simulator' OS=10.1 NAME='iPhone 7 Plus' |
10 |
| - - SCHEME=OptimizelySwiftSDK-iOS TEST_SDK=iphonesimulator PLATFORM='iOS Simulator' OS=10.3.1 NAME='iPhone 7' |
11 |
| - - SCHEME=OptimizelySwiftSDK-tvOS TEST_SDK=appletvsimulator PLATFORM='tvOS Simulator' OS=10.2 NAME='Apple TV 1080p' |
12 |
| -before_install: |
13 |
| - - gem install slather --no-document --quiet |
14 |
| -install: pod install --repo-update |
15 |
| -addons: |
16 |
| - srcclr: true |
17 |
| -script: |
18 |
| - - pod spec lint --quick |
19 |
| - - if [[ "$TRAVIS_BRANCH" == "master" ]]; then xcodebuild test -workspace OptimizelySDK.xcworkspace -scheme $SCHEME -configuration Release CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO -sdk $TEST_SDK -destination "platform=$PLATFORM,OS=$OS,name=$NAME" ONLY_ACTIVE_ARCH=YES > buildoutput; fi |
20 |
| - - more buildoutput | xcpretty |
21 |
| -after_success: |
22 |
| - - slather |
23 |
| - - sleep 5 # https://github.com/travis-ci/travis-ci/issues/4725 |
| 1 | +language: minimal |
| 2 | +os: linux |
24 | 3 |
|
25 | 4 | # Integration tests need to run first to reset the PR build status to pending
|
26 | 5 | stages:
|
27 |
| - - 'Integration tests' |
28 |
| - - 'Test' |
| 6 | + - name: 'Trigger Integration Tests' |
| 7 | + if: env(RUN_COMPAT_SUITE) = true |
| 8 | + - name: 'SourceClear and Lint' |
| 9 | + - name: 'Unit Tests' |
| 10 | + - name: 'Prepare for release' |
| 11 | + if: env(PREP) = true and type = api |
| 12 | + - name: 'Release' |
| 13 | + if: env(RELEASE) = true and type = api |
29 | 14 |
|
30 | 15 | jobs:
|
31 | 16 | include:
|
32 |
| - - stage: 'Integration tests' |
33 |
| - if: env(RUN_COMPAT_SUITE) = true |
| 17 | + - stage: 'Trigger Integration Tests' |
| 18 | + language: minimal |
| 19 | + os: linux |
34 | 20 | env:
|
35 | 21 | - SDK=swift
|
36 | 22 | - BUILD_NUMBER=$TRAVIS_BUILD_NUMBER
|
37 | 23 | - TESTAPP_TAG=master
|
38 | 24 | cache: false
|
39 |
| - language: minimal |
40 |
| - os: linux |
41 | 25 | install:
|
42 | 26 | - mkdir $HOME/travisci-tools && pushd $HOME/travisci-tools && git init && git pull https://$CI_USER_TOKEN@github.com/optimizely/travisci-tools.git && popd
|
43 | 27 | script:
|
44 | 28 | - "$HOME/travisci-tools/fsc-trigger/trigger_fullstack-sdk-compat.sh"
|
45 |
| - after_success: travis_terminate 0 |
| 29 | + |
| 30 | + - stage: 'SourceClear and Lint' |
| 31 | + language: swift |
| 32 | + os: osx |
| 33 | + osx_image: xcode10.1 |
| 34 | + addons: |
| 35 | + srcclr: true |
| 36 | + install: gem install cocoapods |
| 37 | + script: |
| 38 | + - pod spec lint --quick |
| 39 | + |
| 40 | + - &unittests |
| 41 | + stage: 'Unit Tests' |
| 42 | + language: swift |
| 43 | + os: osx |
| 44 | + osx_image: xcode10.1 |
| 45 | + branches: |
| 46 | + only: |
| 47 | + - master |
| 48 | + env: SCHEME=OptimizelySwiftSDK-iOS TEST_SDK=iphonesimulator PLATFORM='iOS Simulator' OS=9.1 NAME='iPad Air' |
| 49 | + name: PLATFORM='iOS Simulator' OS=9.1 NAME='iPad Air' |
| 50 | + before_install: |
| 51 | + - gem install slather --no-document --quiet |
| 52 | + install: |
| 53 | + - pod install --repo-update |
| 54 | + script: |
| 55 | + - pod spec lint --quick |
| 56 | + - if [[ "$TRAVIS_BRANCH" == "master" ]]; then xcodebuild test -workspace OptimizelySDK.xcworkspace -scheme $SCHEME -configuration Release CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO -sdk $TEST_SDK -destination "platform=$PLATFORM,OS=$OS,name=$NAME" ONLY_ACTIVE_ARCH=YES > buildoutput; fi |
| 57 | + - cat buildoutput | xcpretty |
| 58 | + after_success: |
| 59 | + - slather |
| 60 | + - sleep 5 # https://github.com/travis-ci/travis-ci/issues/4725 |
| 61 | + - <<: *unittests |
| 62 | + env: SCHEME=OptimizelySwiftSDK-iOS TEST_SDK=iphonesimulator PLATFORM='iOS Simulator' OS=10.1 NAME='iPhone 7 Plus' |
| 63 | + name: PLATFORM='iOS Simulator' OS=10.1 NAME='iPhone 7 Plus' |
| 64 | + - <<: *unittests |
| 65 | + env: SCHEME=OptimizelySwiftSDK-iOS TEST_SDK=iphonesimulator PLATFORM='iOS Simulator' OS=10.3.1 NAME='iPhone 7' |
| 66 | + name: PLATFORM='iOS Simulator' OS=10.3.1 NAME='iPhone 7' |
| 67 | + - <<: *unittests |
| 68 | + env: SCHEME=OptimizelySwiftSDK-tvOS TEST_SDK=appletvsimulator PLATFORM='tvOS Simulator' OS=10.2 NAME='Apple TV 1080p' |
| 69 | + name: PLATFORM='tvOS Simulator' OS=10.2 NAME='Apple TV 1080p' |
0 commit comments