-
Notifications
You must be signed in to change notification settings - Fork 6k
/
.travis.objc_swift_test.yml
57 lines (50 loc) · 3.12 KB
/
.travis.objc_swift_test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
sudo: required
language: objective-c
osx_image: xcode7.3
cache:
directories:
- $HOME/.m2
- $HOME/.gem
- $HOME/.rvm
- $HOME/.cocoapods
- swagger-api/swagger-codegen/samples/client/petstore/objc/default/SwaggerClientTests/Pods
- swagger-api/swagger-codegen/samples/client/petstore/objc/core-data/SwaggerClientTests/Pods
- swagger-api/swagger-codegen/samples/client/petstore/swift/default/SwaggerClientTests/Pods
- swagger-api/swagger-codegen/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods
services:
- docker
addons:
hosts:
- petstore.swagger.io
before_install:
- export SW=`pwd`
# show host table to confirm petstore.swagger.io is mapped to localhost
- cat /private/etc/hosts
#- rvm install 2.2.2 > /dev/null 2>&1
- rvm use 2.2.4
- gem environment
- gem install cocoapods -v 1.0.1 -N --no-ri --no-rdoc
- gem install xcpretty -N --no-ri --no-rdoc
- pod --version
- pod setup --silent > /dev/null
# xctool already pre-installed
#- brew install xctool
- git clone https://github.com/wing328/swagger-samples
- cd swagger-samples/java/java-jersey-jaxrs && sudo mvn -q jetty:run &
install:
script:
# test default objc client
- cd $SW/samples/client/petstore/objc/default/SwaggerClientTests && pod install && xctool -workspace "SwaggerClient.xcworkspace" -scheme "SwaggerClient-Example" -destination platform='iOS Simulator',OS=8.4,name='iPhone 6' test -test-sdk iphonesimulator CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO
# test objc client with coredata
- cd $SW/samples/client/petstore/objc/core-data/SwaggerClientTests && pod install && xctool -workspace "SwaggerClient.xcworkspace" -scheme "SwaggerClient-Example" -destination platform='iOS Simulator',OS=8.4,name='iPhone 6' test -test-sdk iphonesimulator CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO
- set -o pipefail
# test swift client with promisekit
- cd $SW/samples/client/petstore/swift/promisekit/SwaggerClientTests && pod install && xcodebuild clean test -workspace "SwaggerClient.xcworkspace" -scheme "SwaggerClient" -sdk iphonesimulator GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES GCC_GENERATE_TEST_COVERAGE_FILES=YES | xcpretty
# test default swift client
- cd $SW/samples/client/petstore/swift/default/SwaggerClientTests && pod install && xcodebuild clean test -workspace "SwaggerClient.xcworkspace" -scheme "SwaggerClient" -sdk iphonesimulator GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES GCC_GENERATE_TEST_COVERAGE_FILES=YES | xcpretty
# test swift3 client with promisekit
- cd $SW/samples/client/petstore/swift3/promisekit/SwaggerClientTests && pod install && xcodebuild clean test -workspace "SwaggerClient.xcworkspace" -scheme "SwaggerClient" -sdk iphonesimulator GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES GCC_GENERATE_TEST_COVERAGE_FILES=YES | xcpretty
# test default swift3 client
- cd $SW/samples/client/petstore/swift3/default/SwaggerClientTests && pod install && xcodebuild clean test -workspace "SwaggerClient.xcworkspace" -scheme "SwaggerClient" -sdk iphonesimulator GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES GCC_GENERATE_TEST_COVERAGE_FILES=YES | xcpretty
env:
- DOCKER_IMAGE_NAME=swaggerapi/swagger-generator