diff --git a/.circleci/config.yml b/.circleci/config.yml index 2f05fb9a72ed..71098116b4c3 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -57,54 +57,43 @@ commands: # a reusable command with parameters - run: docker ps -a - run: sleep 30 - run: cat /etc/hosts - # Test - - run: ./mvnw --no-snapshot-updates --quiet clean install -Dorg.slf4j.simpleLogger.defaultLogLevel=error + - run: export MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=128m" - run: name: "Setup custom environment variables" command: echo 'export CIRCLE_NODE_INDEX="<>"' >> $BASH_ENV - run: ./CI/circle_parallel.sh # Save dependency cache - - save_cache: - key: source-v2-{{ .Branch }}-{{ .Revision }} - paths: - # This is a broad list of cache paths to include many possible development environments - # You can probably delete some of these entries - - vendor/bundle - - ~/.nvm - - ~/.pyenv - - ~/virtualenvs - - ~/.m2 - - ~/.ivy2 - - ~/.sbt - - ~/.bundle - - ~/.go_workspace - - ~/.gradle - - ~/.cache/bower - - ".git" - - ~/.stack - - /home/circleci/OpenAPITools/openapi-generator/samples/client/petstore/haskell-http-client/.stack-work - - ~/R - # save "default" cache using the key "source-v2-" - - save_cache: - key: source-v2- - paths: - # This is a broad list of cache paths to include many possible development environments - # You can probably delete some of these entries - - vendor/bundle - - ~/.nvm - - ~/.pyenv - - ~/virtualenvs - - ~/.m2 - - ~/.ivy2 - - ~/.sbt - - ~/.bundle - - ~/.go_workspace - - ~/.gradle - - ~/.cache/bower - - ".git" - - ~/.stack - - /home/circleci/OpenAPITools/openapi-generator/samples/client/petstore/haskell-http-client/.stack-work - - ~/R + #- save_cache: + # key: source-v2-{{ .Branch }}-{{ .Revision }} + # paths: + # # This is a broad list of cache paths to include many possible development environments + # # You can probably delete some of these entries + # - ~/.m2 + # - ~/.ivy2 + # - ~/.sbt + # - ~/.bundle + # - ~/.go_workspace + # - ~/.gradle + # - ".git" + # - ~/.stack + # - ~/R + ## save "default" cache using the key "source-v2-" + #- save_cache: + # key: source-v2- + # paths: + # # This is a broad list of cache paths to include many possible development environments + # # You can probably delete some of these entries + # - vendor/bundle + # - ~/.m2 + # - ~/.ivy2 + # - ~/.sbt + # - ~/.bundle + # - ~/.go_workspace + # - ~/.gradle + # - ~/.cache/bower + # - ".git" + # - ~/.stack + # - ~/R # Teardown # If you break your build into multiple jobs with workflows, you will probably want to do the parts of this that are relevant in each # Save test results diff --git a/CI/circle_parallel.sh b/CI/circle_parallel.sh index b5baa82c9604..8b6a40983aa5 100755 --- a/CI/circle_parallel.sh +++ b/CI/circle_parallel.sh @@ -10,10 +10,13 @@ set -e export NODE_ENV=test if [ "$NODE_INDEX" = "1" ]; then - echo "Running node $NODE_INDEX to test 'samples.circleci' defined in pom.xml ..." + echo "Running node $NODE_INDEX ..." java -version - ./mvnw --no-snapshot-updates --quiet verify -Psamples.circleci -Dorg.slf4j.simpleLogger.defaultLogLevel=error + (cd samples/client/petstore/ruby && mvn integration-test) + (cd samples/client/petstore/ruby-faraday && mvn integration-test) + (cd samples/client/petstore/ruby-httpx && mvn integration-test) + (cd samples/client/petstore/ruby-autoload && mvn integration-test) elif [ "$NODE_INDEX" = "2" ]; then echo "Running node $NODE_INDEX to test Go" @@ -33,20 +36,14 @@ elif [ "$NODE_INDEX" = "2" ]; then export PATH="/usr/local/go1.18/go/bin:$PATH" go version - # run integration tests - ./mvnw --no-snapshot-updates --quiet verify -Psamples.misc -Dorg.slf4j.simpleLogger.defaultLogLevel=error + # run go integration tests + (cd samples/client/petstore/go && mvn integration-test) + (cd samples/openapi3/client/petstore/go && mvn integration-test) + (cd samples/openapi3/client/petstore/go-petstore-generateMarshalJSON-false && mvn integration-test) + elif [ "$NODE_INDEX" = "3" ]; then - echo "Running node $NODE_INDEX to test 'samples.circleci.node3' defined in pom.xml ..." - #wget https://www.python.org/ftp/python/3.8.9/Python-3.8.9.tgz - #tar -xf Python-3.8.9.tgz - #cd Python-3.8.9 - #./configure --enable-optimizations - #sudo make altinstall - pyenv install --list - pyenv install 3.7.12 - #pyenv install 2.7.14 #python2 no longer supported - pyenv global 3.7.12 + echo "Running node $NODE_INDEX ... " # Install node@stable (for angular 6) set +e @@ -63,23 +60,71 @@ elif [ "$NODE_INDEX" = "3" ]; then echo 'export NVM_DIR="/opt/circleci/.nvm"' >> $BASH_ENV echo "[ -s \"$NVM_DIR/nvm.sh\" ] && . \"$NVM_DIR/nvm.sh\"" >> $BASH_ENV - ./mvnw --no-snapshot-updates --quiet verify -Psamples.circleci.node3 -Dorg.slf4j.simpleLogger.defaultLogLevel=error + (cd samples/client/others/typescript-angular && mvn integration-test) + (cd samples/client/petstore/typescript-angular-v12-provided-in-root && mvn integration-test) + (cd samples/client/petstore/typescript-angular-v13-provided-in-root && mvn integration-test) + (cd samples/client/petstore/typescript-angular-v14-provided-in-root && mvn integration-test) + (cd samples/client/petstore/typescript-angular-v15-provided-in-root && mvn integration-test) + (cd samples/client/petstore/typescript-angular-v16-provided-in-root && mvn integration-test) + (cd samples/openapi3/client/petstore/typescript/builds/default && mvn integration-test) + (cd samples/openapi3/client/petstore/typescript/tests/default && mvn integration-test) + (cd samples/openapi3/client/petstore/typescript/builds/jquery && mvn integration-test) + (cd samples/openapi3/client/petstore/typescript/tests/jquery && mvn integration-test) + (cd samples/openapi3/client/petstore/typescript/builds/object_params && mvn integration-test) + (cd samples/openapi3/client/petstore/typescript/tests/object_params && mvn integration-test) + (cd samples/openapi3/client/petstore/typescript/builds/inversify && mvn integration-test) + (cd samples/openapi3/client/petstore/typescript/tests/inversify && mvn integration-test) + #(cd samples/openapi3/client/petstore/typescript/tests/deno && mvn integration-test) + (cd samples/openapi3/client/petstore/typescript/builds/browser && mvn integration-test) + (cd samples/openapi3/client/petstore/typescript/tests/browser && mvn integration-test) + (cd samples/client/petstore/typescript-fetch/builds/default && mvn integration-test) + (cd samples/client/petstore/typescript-fetch/builds/es6-target && mvn integration-test) + (cd samples/client/petstore/typescript-fetch/builds/with-npm-version && mvn integration-test) + (cd samples/client/petstore/typescript-fetch/tests/default && mvn integration-test) + (cd samples/client/petstore/typescript-node/npm && mvn integration-test) + (cd samples/client/petstore/typescript-rxjs/builds/with-npm-version && mvn integration-test) + (cd samples/client/petstore/typescript-axios/builds/with-npm-version && mvn integration-test) + (cd samples/client/petstore/typescript-axios/tests/default && mvn integration-test) + (cd samples/client/petstore/javascript-flowtyped && mvn integration-test) + (cd samples/client/petstore/javascript-es6 && mvn integration-test) + (cd samples/client/petstore/javascript-promise-es6 && mvn integration-test) elif [ "$NODE_INDEX" = "4" ]; then - echo "Running node $NODE_INDEX to test 'samples.circleci.node4' defined in pom.xml ..." + echo "Running node $NODE_INDEX ..." - #mvn --no-snapshot-updates --quiet verify -Psamples.circleci.node4 -Dorg.slf4j.simpleLogger.defaultLogLevel=error - #(cd samples/openapi3/client/petstore/python && make test) - # comment out due to ModuleNotFoundError: No module named 'urllib3.request' - #(cd samples/openapi3/client/petstore/python-prior && make test) - #(cd samples/openapi3/client/3_0_3_unit_test/python && make test) + #wget https://www.python.org/ftp/python/3.8.9/Python-3.8.9.tgz + #tar -xf Python-3.8.9.tgz + #cd Python-3.8.9 + #./configure --enable-optimizations + #sudo make altinstall + pyenv install --list + pyenv install 3.7.12 + #pyenv install 2.7.14 #python2 no longer supported + pyenv global 3.7.12 + + (cd samples/openapi3/client/petstore/python && mvn integration-test) + (cd samples/openapi3/client/petstore/python-pydantic-v1 && mvn integration-test) + (cd samples/openapi3/client/petstore/python-aiohttp && mvn integration-test) + (cd samples/openapi3/client/petstore/python-pydantic-v1-aiohttp && mvn integration-test) else - echo "Running node $NODE_INDEX to test 'samples.circleci.others' defined in pom.xml ..." + echo "Running node $NODE_INDEX ..." java -version - ./mvnw --no-snapshot-updates --quiet verify -Psamples.circleci.others -Dorg.slf4j.simpleLogger.defaultLogLevel=error - ./mvnw --no-snapshot-updates --quiet javadoc:javadoc -Psamples.circleci -Dorg.slf4j.simpleLogger.defaultLogLevel=error + (cd samples/client/petstore/scala-akka && mvn integration-test) + (cd samples/client/petstore/scala-sttp && mvn integration-test) + (cd samples/client/petstore/scala-sttp4 && mvn integration-test) + (cd samples/client/petstore/clojure && mvn integration-test) + (cd samples/client/petstore/java/jersey2-java8 && mvn integration-test) + (cd samples/openapi3/client/petstore/java/jersey2-java8 && mvn integration-test) + (cd samples/client/petstore/java/jersey3 && mvn integration-test) + (cd samples/client/others/java/okhttp-gson-streaming && mvn integration-test) + (cd samples/client/petstore/java/okhttp-gson && mvn integration-test) + (cd samples/client/petstore/java/okhttp-gson-3.1 && mvn integration-test) + (cd samples/client/petstore/java/resteasy && mvn integration-test) + (cd samples/client/petstore/java-micronaut-client && mvn integration-test) + (cd samples/client/petstore/java/apache-httpclient && mvn integration-test) + fi diff --git a/pom.xml b/pom.xml index 8ba0b3f21115..12b870bd5e52 100644 --- a/pom.xml +++ b/pom.xml @@ -1119,245 +1119,6 @@ samples/server/petstore/java-undertow - - samples - - - env - samples - - - - - - - - - - - - - samples/client/petstore/rust - samples/client/petstore/rust/hyper/petstore - samples/client/petstore/rust/reqwest/petstore - samples/client/petstore/rust/reqwest/petstore-async - samples/client/petstore/rust/reqwest/petstore-async-middleware - - - - - - samples.circleci - - - env - samples.circleci - - - - samples/client/petstore/ruby - samples/client/petstore/ruby-faraday - samples/client/petstore/ruby-httpx - samples/client/petstore/ruby-autoload - - - - samples.circleci.spring - - - env - samples.circleci.spring - - - - - samples/client/petstore/spring-cloud - - - - - samples.circleci.node3 - - - env - samples.circleci.node3 - - - - - samples/openapi3/client/petstore/python - samples/openapi3/client/petstore/python-pydantic-v1 - samples/openapi3/client/petstore/python-aiohttp - samples/openapi3/client/petstore/python-pydantic-v1-aiohttp - - - samples/client/others/typescript-angular - samples/client/petstore/typescript-angular-v12-provided-in-root - samples/client/petstore/typescript-angular-v13-provided-in-root - samples/client/petstore/typescript-angular-v14-provided-in-root - samples/client/petstore/typescript-angular-v15-provided-in-root - samples/client/petstore/typescript-angular-v16-provided-in-root - samples/openapi3/client/petstore/typescript/builds/default - samples/openapi3/client/petstore/typescript/tests/default - samples/openapi3/client/petstore/typescript/builds/jquery - samples/openapi3/client/petstore/typescript/tests/jquery - samples/openapi3/client/petstore/typescript/builds/object_params - samples/openapi3/client/petstore/typescript/tests/object_params - samples/openapi3/client/petstore/typescript/builds/inversify - - samples/openapi3/client/petstore/typescript/builds/browser - samples/openapi3/client/petstore/typescript/tests/browser - samples/client/petstore/typescript-fetch/builds/default - samples/client/petstore/typescript-fetch/builds/es6-target - samples/client/petstore/typescript-fetch/builds/with-npm-version - samples/client/petstore/typescript-fetch/tests/default - samples/client/petstore/typescript-node/npm - samples/client/petstore/typescript-rxjs/builds/with-npm-version - samples/client/petstore/typescript-axios/builds/with-npm-version - samples/client/petstore/typescript-axios/tests/default - samples/client/petstore/javascript-flowtyped - samples/client/petstore/javascript-es6 - samples/client/petstore/javascript-promise-es6 - - - - - samples.circleci.node4 - - - env - samples.circleci.node4 - - - - - - - - samples.circleci.others - - - env - samples.circleci.others - - - - - - samples/client/petstore/scala-akka - samples/client/petstore/scala-sttp - samples/client/petstore/scala-sttp4 - samples/client/petstore/clojure - samples/client/petstore/java/jersey2-java8 - samples/openapi3/client/petstore/java/jersey2-java8 - samples/client/petstore/java/jersey3 - samples/client/others/java/okhttp-gson-streaming - samples/client/petstore/java/okhttp-gson - samples/client/petstore/java/okhttp-gson-3.1 - samples/client/petstore/java/resteasy - samples/client/petstore/java-micronaut-client - samples/client/petstore/java/apache-httpclient - - samples/server/petstore/java-undertow - - - - - samples.misc - - - env - samples.misc - - - - - - - - - samples/client/petstore/go - samples/openapi3/client/petstore/go - samples/openapi3/client/petstore/go-petstore-generateMarshalJSON-false - - - - - samples.dart - - - env - samples.dart - - - - samples/openapi3/client/petstore/dart2/petstore_client_lib - samples/openapi3/client/petstore/dart-dio/oneof - samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance - samples/openapi3/client/petstore/dart-dio/oneof_primitive - samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake - samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable - - - - samples.ios - - - env - samples.ios - - - - - samples/client/petstore/swift5/alamofireLibrary - samples/client/petstore/swift5/combineLibrary - samples/client/petstore/swift5/default - samples/client/petstore/swift5/deprecated - samples/client/petstore/swift5/frozenEnums - samples/client/petstore/swift5/nonPublicApi - samples/client/petstore/swift5/objcCompatible - samples/client/petstore/swift5/promisekitLibrary - samples/client/petstore/swift5/readonlyProperties - samples/client/petstore/swift5/resultLibrary - samples/client/petstore/swift5/rxswiftLibrary - samples/client/petstore/swift5/urlsessionLibrary - - - - - - openapi-generator