Test Python clients in CircleCI (#10354)

* test python in node3

* install python3

* install python 3.6

* use pyenv

* run with 3.5.2

* install py 3.8.9

* fix folder name

* install via pyenv

* list pyenv

* install 3.6.3

* rearrange test

* Revert "rearrange test"

This reverts commit 1b075ed97ce95c94fb1d15e9a9ffbcbde3b46f1b.

* only test py3
This commit is contained in:
William Cheng 2021-09-09 12:43:55 +08:00 committed by GitHub
parent a8ee07c132
commit 483a13f3e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 32 additions and 4 deletions

View File

@ -10,7 +10,7 @@ jobs:
machine:
image: circleci/classic:latest
working_directory: ~/OpenAPITools/openapi-generator
parallelism: 3
parallelism: 4
shell: /bin/bash --login
environment:
CIRCLE_ARTIFACTS: /tmp/circleci-artifacts

View File

@ -43,6 +43,21 @@ elif [ "$NODE_INDEX" = "2" ]; then
# run integration tests
mvn --no-snapshot-updates --quiet verify -Psamples.misc -Dorg.slf4j.simpleLogger.defaultLogLevel=error
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.6.3
pyenv global 3.6.3
python3 --version
mvn --no-snapshot-updates --quiet verify -Psamples.circleci.node3 -Dorg.slf4j.simpleLogger.defaultLogLevel=error
else
echo "Running node $NODE_INDEX to test 'samples.circleci.others' defined in pom.xml ..."
#sudo update-java-alternatives -s java-1.7.0-openjdk-amd64

19
pom.xml
View File

@ -1224,12 +1224,9 @@
<module>samples/client/petstore/php/OpenAPIClient-php</module> -->
<!--<module>samples/client/petstore/javascript-apollo</module>-->
<module>samples/client/petstore/javascript-flowtyped</module>
<module>samples/client/petstore/python</module>
<module>samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent</module>
<module>samples/client/petstore/python-legacy</module>
<module>samples/client/petstore/python-asyncio</module>
<module>samples/client/petstore/python-tornado</module>
<module>samples/openapi3/client/petstore/python</module>
<module>samples/openapi3/client/petstore/python-legacy</module>
</modules>
</profile>
@ -1304,6 +1301,22 @@
<!--<module>samples/server/petstore/kotlin/vertx</module>-->
</modules>
</profile>
<!-- node 3 tests in CircleCI -->
<profile>
<id>samples.circleci.node3</id>
<activation>
<property>
<name>env</name>
<value>samples.circleci.node3</value>
</property>
</activation>
<modules>
<!-- clients -->
<module>samples/client/petstore/python</module>
<module>samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent</module>
<module>samples/openapi3/client/petstore/python</module>
</modules>
</profile>
<!-- other tests in CircleCI -->
<profile>
<id>samples.circleci.others</id>