diff --git a/.circleci/config.yml b/.circleci/config.yml index bcf49b4f2..280919e1f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -24,15 +24,6 @@ jobs: - run: echo "listen_addresses='*'" >> /etc/postgresql/9.5/main/postgresql.conf - run: sed -i 's/^#*\s*max_connections\s*=.*/max_connections = 10000/' /etc/postgresql/9.5/main/postgresql.conf - run: (cd .circleci/ && ./doTests.sh << parameters.plugin >>) - - run: - command: cp ~/supertokens-root/supertokens-core/build/test-results/test/*.xml ~/junit/ - when: always - - when: - condition: - not: - equal: [ << parameters.plugin >>, "sqlite" ] - steps: - - run: cp ~/supertokens-root/supertokens-<< parameters.plugin >>-plugin/build/test-results/test/*.xml ~/junit/ - store_test_results: path: ~/junit - slack/status diff --git a/.circleci/doTests.sh b/.circleci/doTests.sh index 6404af168..3cc3df115 100755 --- a/.circleci/doTests.sh +++ b/.circleci/doTests.sh @@ -65,6 +65,8 @@ then exit 1 fi +mkdir -p ~/junit + someTestsRan=false while read -u 10 line do @@ -165,7 +167,21 @@ do ./startTestingEnv --cicd - if [[ $? -ne 0 ]] + TEST_EXIT_CODE=$? + + if [ -d ~/junit ] + then + echo "Copying output from core" + cp ~/supertokens-root/supertokens-core/build/test-results/test/*.xml ~/junit/ + + if [[ $pluginToTest != "sqlite" ]] + then + echo "Copying output from plugin" + cp ~/supertokens-root/supertokens-$pluginToTest-plugin/build/test-results/test/*.xml ~/junit/ + fi + fi + + if [[ $TEST_EXIT_CODE -ne 0 ]] then echo "" echo "" @@ -197,7 +213,7 @@ do echo "" echo "" - cd ../ + cd .. rm -rf supertokens-root if [[ $currPinnedDb == "sqlite" ]]