Skip to content

Commit

Permalink
Merge pull request #1072 from supertokens/test-cicd/rerun_failed
Browse files Browse the repository at this point in the history
test: enable/fix rerun failed test on ci-cd
  • Loading branch information
porcellus authored Oct 29, 2024
2 parents 20bf94e + d745cb6 commit bb8ede4
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 11 deletions.
9 changes: 0 additions & 9 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
20 changes: 18 additions & 2 deletions .circleci/doTests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ then
exit 1
fi

mkdir -p ~/junit

someTestsRan=false
while read -u 10 line
do
Expand Down Expand Up @@ -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 ""
Expand Down Expand Up @@ -197,7 +213,7 @@ do
echo ""
echo ""

cd ../
cd ..
rm -rf supertokens-root

if [[ $currPinnedDb == "sqlite" ]]
Expand Down

0 comments on commit bb8ede4

Please sign in to comment.