Skip to content

Commit 52f606b

Browse files
authored
Fix Swift3 test cases and add pom.xml, travis config for iOS test (#7608)
* add pom.xml for testing objc, swift * add travis config for testing swift, objc * test swift, objc clients * use ruby 2.4.2 * remove stack * update swift3 petstore * test with xcode9 * remove testing inline additional properties for swift3 * restore travis, pom
1 parent d38a090 commit 52f606b

File tree

32 files changed

+2476
-213
lines changed

32 files changed

+2476
-213
lines changed

.travis.yml.ios

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
sudo: required
2+
language: objective-c
3+
osx_image: xcode8.1
4+
cache:
5+
directories:
6+
- $HOME/.m2
7+
- $HOME/.ivy2
8+
- $HOME/.gradle/caches/
9+
- $HOME/.gradle/wrapper/
10+
- $HOME/.stack
11+
- $HOME/samples/client/petstore/php/SwaggerClient-php/vendor
12+
- $HOME/samples/client/petstore/ruby/venodr/bundle
13+
- $HOME/samples/client/petstore/python/.venv/
14+
- $HOME/samples/client/petstore/typescript-node/npm/node_modules
15+
- $HOME/samples/client/petstore/typescript-node/npm/typings/
16+
- $HOME/samples/client/petstore/typescript-fetch/tests/default/node_modules
17+
- $HOME/samples/client/petstore/typescript-fetch/tests/default/typings
18+
- $HOME/samples/client/petstore/typescript-fetch/builds/default/node_modules
19+
- $HOME/samples/client/petstore/typescript-fetch/builds/default/typings
20+
- $HOME/samples/client/petstore/typescript-fetch/builds/es6-target/node_modules
21+
- $HOME/samples/client/petstore/typescript-fetch/builds/es6-target/typings
22+
- $HOME/samples/client/petstore/typescript-fetch/builds/with-npm-version/node_modules
23+
- $HOME/samples/client/petstore/typescript-fetch/npm/with-npm-version/typings
24+
- $HOME/samples/client/petstore/typescript-angularjs/node_modules
25+
- $HOME/samples/client/petstore/typescript-angularjs/typings
26+
- $HOME/.cocoapods/repos/master
27+
timeout: 1000
28+
29+
# comment out the host table change to use the public petstore server
30+
addons:
31+
hosts:
32+
- petstore.swagger.io
33+
34+
before_install:
35+
- export SW=`pwd`
36+
- rvm list
37+
- rvm use 2.3.0
38+
- gem environment
39+
- gem install bundler -N --no-ri --no-rdoc
40+
- gem install cocoapods -v 1.2.1 -N --no-ri --no-rdoc
41+
- gem install xcpretty -N --no-ri --no-rdoc
42+
- pod --version
43+
# comment out below to avoid errors
44+
#- pod repo update
45+
- pod setup --silent > /dev/null
46+
- mkdir -p ~/.local/bin
47+
- export PATH=$HOME/.local/bin:$PATH
48+
# start local petstore server
49+
- git clone -b docker --single-branch https://github.com/wing328/swagger-samples
50+
- cd swagger-samples/java/java-jersey-jaxrs
51+
- sudo mvn jetty:run &
52+
- cd $SW
53+
54+
# show host table to confirm petstore.swagger.io is mapped to localhost
55+
- cat /etc/hosts
56+
# show java version
57+
- java -version
58+
# show brew version
59+
- brew --version
60+
# show xcpretty version
61+
- xcpretty -v
62+
# show go version
63+
- go version
64+
# show stack version
65+
- stack --version
66+
67+
script:
68+
# run integration tests defined in maven pom.xml
69+
- mvn -q --batch-mode verify -Psamples

bin/swift3-petstore-objcCompatible.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,6 @@ fi
2626

2727
# if you've executed sbt assembly previously it will use that instead.
2828
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
29-
ags="generate -v -t modules/swagger-codegen/src/main/resources/swift3 -i modules/swagger-codegen/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -l swift3 -c ./bin/swift3-petstore-objcCompatible.json -o samples/client/petstore/swift3/objcCompatible $@"
29+
ags="generate -v -t modules/swagger-codegen/src/main/resources/swift3 -i modules/swagger-codegen/src/test/resources/2_0/swift/petstore-with-fake-endpoints-models-for-testing.yaml -l swift3 -c ./bin/swift3-petstore-objcCompatible.json -o samples/client/petstore/swift3/objcCompatible $@"
3030

3131
java $JAVA_OPTS -jar $executable $ags

bin/swift3-petstore-promisekit.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,6 @@ fi
2626

2727
# if you've executed sbt assembly previously it will use that instead.
2828
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
29-
ags="generate -t modules/swagger-codegen/src/main/resources/swift3 -i modules/swagger-codegen/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -l swift3 -c ./bin/swift3-petstore-promisekit.json -o samples/client/petstore/swift3/promisekit $@"
29+
ags="generate -t modules/swagger-codegen/src/main/resources/swift3 -i modules/swagger-codegen/src/test/resources/2_0/swift/petstore-with-fake-endpoints-models-for-testing.yaml -l swift3 -c ./bin/swift3-petstore-promisekit.json -o samples/client/petstore/swift3/promisekit $@"
3030

3131
java $JAVA_OPTS -jar $executable $ags

bin/swift3-petstore-rxswift.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,6 @@ fi
2626

2727
# if you've executed sbt assembly previously it will use that instead.
2828
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
29-
ags="generate -t modules/swagger-codegen/src/main/resources/swift3 -i modules/swagger-codegen/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -l swift3 -c ./bin/swift3-petstore-rxswift.json -o samples/client/petstore/swift3/rxswift $@"
29+
ags="generate -t modules/swagger-codegen/src/main/resources/swift3 -i modules/swagger-codegen/src/test/resources/2_0/swift/petstore-with-fake-endpoints-models-for-testing.yaml -l swift3 -c ./bin/swift3-petstore-rxswift.json -o samples/client/petstore/swift3/rxswift $@"
3030

3131
java $JAVA_OPTS -jar $executable $ags

bin/swift3-petstore-unwraprequired.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,6 @@ fi
2626

2727
# if you've executed sbt assembly previously it will use that instead.
2828
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
29-
ags="$@ generate -t modules/swagger-codegen/src/main/resources/swift3 -i modules/swagger-codegen/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -l swift3 -c ./bin/swift3-petstore-unwraprequired.json -o samples/client/petstore/swift3/unwraprequired"
29+
ags="$@ generate -t modules/swagger-codegen/src/main/resources/swift3 -i modules/swagger-codegen/src/test/resources/2_0/swift/petstore-with-fake-endpoints-models-for-testing.yaml -l swift3 -c ./bin/swift3-petstore-unwraprequired.json -o samples/client/petstore/swift3/unwraprequired"
3030

3131
java $JAVA_OPTS -jar $executable $ags

bin/swift3-petstore.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,6 @@ fi
2626

2727
# if you've executed sbt assembly previously it will use that instead.
2828
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
29-
ags="generate -t modules/swagger-codegen/src/main/resources/swift3 -i modules/swagger-codegen/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -l swift3 -c ./bin/swift3-petstore.json -o samples/client/petstore/swift3/default $@"
29+
ags="generate -t modules/swagger-codegen/src/main/resources/swift3 -i modules/swagger-codegen/src/test/resources/2_0/swift/petstore-with-fake-endpoints-models-for-testing.yaml -l swift3 -c ./bin/swift3-petstore.json -o samples/client/petstore/swift3/default $@"
3030

3131
java $JAVA_OPTS -jar $executable $ags

0 commit comments

Comments
 (0)