[CircleCI] improve execution time (#12253)

* add cache folder, remove mvn install

* debug

* update test

* fix cache
This commit is contained in:
William Cheng 2022-04-30 16:43:39 +08:00 committed by GitHub
parent 89d17e2845
commit 0b2cb06229
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 11 deletions

View File

@ -59,6 +59,8 @@ commands: # a reusable command with parameters
# 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
@ -78,6 +80,8 @@ commands: # a reusable command with parameters
# 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

View File

@ -75,22 +75,14 @@ elif [ "$NODE_INDEX" = "3" ]; then
mvn --no-snapshot-updates --quiet verify -Psamples.circleci.node3 -Dorg.slf4j.simpleLogger.defaultLogLevel=error
elif [ "$NODE_INDEX" = "4" ]; then
echo "Running node $NODE_INDEX to test 'samples.circleci.node4' defined in pom.xml ..."
# install maven and java so we can use them to run our tests
apt-get update && apt-get install -y default-jdk maven sudo
java -version
export JAVA_HOME=$(readlink -f /usr/bin/java | sed "s:bin/java::")
echo $JAVA_HOME
# show os version
uname -a
mvn --no-snapshot-updates --quiet verify -Psamples.circleci.node4 -Dorg.slf4j.simpleLogger.defaultLogLevel=error
#mvn --no-snapshot-updates --quiet verify -Psamples.circleci.node4 -Dorg.slf4j.simpleLogger.defaultLogLevel=error
(cd samples/openapi3/client/petstore/python && make test)
(cd samples/openapi3/client/petstore/python-experimental && make test)
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
java -version
mvn --no-snapshot-updates --quiet verify -Psamples.circleci.others -Dorg.slf4j.simpleLogger.defaultLogLevel=error