Skip to content

Commit

Permalink
Merge pull request #151 from supertokens/ci/fix_ci_test_script
Browse files Browse the repository at this point in the history
ci: fix ci test script
  • Loading branch information
porcellus authored Jan 12, 2025
2 parents 70a4c6b + cf6e8d0 commit 2788000
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions .circleci/doTests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ function cleanup {
trap cleanup EXIT
cleanup

mkdir -p ~/junit

pluginInterfaceJson=`cat ../pluginInterfaceSupported.json`
pluginInterfaceLength=`echo $pluginInterfaceJson | jq ".versions | length"`
pluginInterfaceArray=`echo $pluginInterfaceJson | jq ".versions"`
Expand Down Expand Up @@ -110,10 +112,20 @@ do
git checkout dev-v$pluginVersion
cd ../
echo $SUPERTOKENS_API_KEY > apiPassword
./startTestingEnv --cicd
sed -i 's/# mysql_connection_uri:/mysql_connection_uri: mysql:\/\/root:root@localhost:3306?rewriteBatchedStatements=true/g' config.yaml

if [[ $? -ne 0 ]]
./startTestingEnv --cicd
TEST_EXIT_CODE=$?

if [ -d ~/junit ]
then
echo "Copying output from core"
cp ~/supertokens-root/supertokens-core/build/test-results/test/*.xml ~/junit/
echo "Copying output from plugin"
cp ~/supertokens-root/supertokens-mysql-plugin/build/test-results/test/*.xml ~/junit/
fi

if [[ $TEST_EXIT_CODE -ne 0 ]]
then
cat logs/*
cd ../project/
Expand Down

0 comments on commit 2788000

Please sign in to comment.