Skip to content

Commit

Permalink
ci: experiment with rerun failed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
porcellus committed Nov 21, 2024
1 parent eccc111 commit e45c056
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions .circleci/setupAndTestWithAuthReact.sh
Original file line number Diff line number Diff line change
Expand Up @@ -159,17 +159,13 @@ done
sleep 2 # Because the server is responding does not mean the app is ready. Let's wait another 2secs to make sure the app is up.
echo "Start mocha testing"

if ! [[ -z "${CI}" ]]; then
export SPEC_FILES=$(circleci tests glob 'test/end-to-end/**/*.test.js' 'test/unit/**/*.test.js')
echo "Selected spec files: $SPEC_FILES, $CIRCLE_NODE_TOTAL/$CIRCLE_NODE_INDEX"
fi
export SPEC_FILES=$(circleci tests glob 'test/end-to-end/**/*.test.js' 'test/unit/**/*.test.js')
echo $SPEC_FILES | SCREENSHOT_ROOT=~/test_report/screenshots APP_SERVER=$apiPort TEST_MODE=testing multi="spec=- mocha-junit-reporter=/dev/null" circleci tests run --command="xargs npx mocha mocha --reporter mocha-multi --require @babel/register --require test/test.mocha.env --timeout 40000 --no-config" --verbose --split-by=timings

SCREENSHOT_ROOT=~/test_report/screenshots APP_SERVER=$apiPort TEST_MODE=testing mocha --bail=$BAIL --require @babel/register --require test/test.mocha.env --timeout 40000 --no-config $SPEC_FILES
testPassed=$?;
if ! [[ -z "${CI}" ]]; then
cp ../supertokens-root/logs/error.log ~/test_report/logs/core_error.log
cp ../supertokens-root/logs/info.log ~/test_report/logs/core_info.log
fi
cp ../supertokens-root/logs/error.log ~/test_report/logs/core_error.log
cp ../supertokens-root/logs/info.log ~/test_report/logs/core_info.log

echo "testPassed exit code: $testPassed"
killServers

Expand Down

0 comments on commit e45c056

Please sign in to comment.