2018-07-20 18:45:14 +08:00
#!/bin/bash
2018-10-09 10:25:28 +08:00
#
# A bash script to run CircleCI node/test in parallel
#
2018-07-20 18:45:14 +08:00
NODE_INDEX = ${ CIRCLE_NODE_INDEX :- 0 }
2019-02-24 11:19:09 +08:00
set -e
2021-10-02 15:38:05 +08:00
export NODE_ENV = test
2018-07-20 18:45:14 +08:00
if [ " $NODE_INDEX " = "1" ] ; then
2023-11-13 10:00:55 +08:00
echo " Running node $NODE_INDEX ... "
2020-03-07 00:20:44 +08:00
2024-03-29 09:58:08 -04:00
sudo apt-get -y install cpanminus
2024-01-22 14:30:53 +08:00
2025-01-08 10:38:23 +01:00
echo "Testing perl"
2024-01-22 14:30:53 +08:00
( cd samples/client/petstore/perl && /bin/bash ./test.bash)
2025-01-08 10:38:23 +01:00
2018-08-31 09:16:41 +02:00
elif [ " $NODE_INDEX " = "2" ] ; then
2025-10-16 14:50:41 +08:00
echo " Running node $NODE_INDEX to test cpp-restsdk "
2021-10-29 13:38:16 +08:00
2024-06-01 17:31:20 +08:00
# install cpprestsdk
sudo apt-get install libcpprest-dev
2024-06-07 12:24:39 +08:00
wget "https://github.com/aminya/setup-cpp/releases/download/v0.37.0/setup-cpp-x64-linux"
chmod +x ./setup-cpp-x64-linux
sudo ./setup-cpp-x64-linux --compiler llvm --cmake true --ninja true
source ~/.cpprc # activate cpp environment variables
2024-06-01 17:31:20 +08:00
( cd samples/client/petstore/cpp-restsdk/client && mvn integration-test)
2023-11-13 10:00:55 +08:00
2021-09-09 12:43:55 +08:00
elif [ " $NODE_INDEX " = "3" ] ; then
2023-11-13 10:00:55 +08:00
echo " Running node $NODE_INDEX ... "
2021-09-09 12:43:55 +08:00
2025-10-16 14:50:41 +08:00
echo "Testing ruby"
( 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)
2022-01-24 15:44:38 -08:00
2018-07-20 18:45:14 +08:00
else
2023-11-13 10:00:55 +08:00
echo " Running node $NODE_INDEX ... "
2018-07-20 18:45:14 +08:00
java -version
2025-10-16 14:50:41 +08:00
./mvnw clean install
2020-03-07 00:20:44 +08:00
2018-07-20 18:45:14 +08:00
fi