Skip to content

Commit

Permalink
Add some improvements for proper partial re-run support in circle CI
Browse files Browse the repository at this point in the history
  • Loading branch information
deepjyoti30-st committed Dec 3, 2024
1 parent fa7f8f9 commit 87a5590
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
5 changes: 4 additions & 1 deletion .circleci/setupAndTestBackendSDKWithFreeCore.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ fi

echo "Testing with FREE core: $coreVersion, plugin-interface: $pluginInterfaceVersion"

mkdir -p ~/test_report

cd ../../
git clone [email protected]:supertokens/supertokens-root.git
cd supertokens-root
Expand Down Expand Up @@ -107,7 +109,8 @@ git checkout $frontendDriverVersion
npm install
npm run build

API_PORT=$API_PORT TEST_MODE=testing SUPERTOKENS_CORE_TAG=$coreTag NODE_PORT=8081 INSTALL_PATH=../supertokens-root multi="spec=- mocha-junit-reporter=./junit-results.xml" circleci tests run --command="xargs npx mocha mocha --node-option no-experimental-fetch -r test/fetch-polyfill.mjs --reporter mocha-multi --require @babel/register --require test/test.mocha.env --timeout 40000 --no-config -f test/**/*.test.js" --verbose --split-by=timings
TEST_FILES=$(circleci tests glob "test/**/*.test.js")
API_PORT=$API_PORT TEST_MODE=testing SUPERTOKENS_CORE_TAG=$coreTag NODE_PORT=8081 INSTALL_PATH=../supertokens-root multi="spec=- mocha-junit-reporter=~/test_report/junit-results.xml" echo "$TEST_FILES" | circleci tests run --command="xargs npx mocha mocha --node-option no-experimental-fetch -r test/fetch-polyfill.mjs --reporter mocha-multi --require @babel/register --require test/test.mocha.env --timeout 40000 --no-config" --verbose --split-by=timings

# kill test-server
kill $(lsof -t -i:$API_PORT)
4 changes: 3 additions & 1 deletion .circleci/setupAndTestWithFreeCore.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ then
fi
echo "Testing with FREE core: $coreVersion, plugin-interface: $pluginInterfaceVersion"

mkdir -p ~/test_report
cd ../../
git clone [email protected]:supertokens/supertokens-root.git
cd supertokens-root
Expand Down Expand Up @@ -88,4 +89,5 @@ cd ../project/
# Set the script to exit on error
set -e

TEST_MODE=testing SUPERTOKENS_CORE_TAG=$coreTag NODE_PORT=8081 INSTALL_PATH=../supertokens-root multi="spec=- mocha-junit-reporter=./junit-results.xml" circleci tests run --command="xargs npx mocha mocha --node-option no-experimental-fetch -r test/fetch-polyfill.mjs --reporter mocha-multi --require @babel/register --require test/test.mocha.env --timeout 40000 --no-config -f test/**/*.test.js" --verbose --split-by=timings
TEST_FILES=$(circleci tests glob "test/**/*.test.js")
TEST_MODE=testing SUPERTOKENS_CORE_TAG=$coreTag NODE_PORT=8081 INSTALL_PATH=../supertokens-root multi="spec=- mocha-junit-reporter=./junit-results.xml" echo "$TEST_FILES" | circleci tests run --command="xargs npx mocha mocha --node-option no-experimental-fetch -r test/fetch-polyfill.mjs --reporter mocha-multi --require @babel/register --require test/test.mocha.env --timeout 40000 --no-config" --verbose --split-by=timings
5 changes: 4 additions & 1 deletion .circleci/setupAndTestWithFrontend.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ fi

echo "Testing with frontend website: $2, FREE core: $coreVersion, plugin-interface: $pluginInterfaceVersion"

mkdir -p ~/test_report

cd ../../
git clone [email protected]:supertokens/supertokens-root.git
cd supertokens-root
Expand Down Expand Up @@ -96,7 +98,8 @@ npm i
cd ../../
npm i -d

TEST_MODE=testing SUPERTOKENS_CORE_TAG=$coreTag NODE_PORT=8081 INSTALL_PATH=../supertokens-root multi="spec=- mocha-junit-reporter=./junit-results.xml" circleci tests run --command="xargs npx mocha mocha --node-option no-experimental-fetch -r test/fetch-polyfill.mjs --reporter mocha-multi --require @babel/register --require test/test.mocha.env --timeout 40000 --no-config -f test/**/*.test.js" --verbose --split-by=timings
TEST_FILES=$(circleci tests glob "test/**/*.test.js")
TEST_MODE=testing SUPERTOKENS_CORE_TAG=$coreTag NODE_PORT=8081 INSTALL_PATH=../supertokens-root multi="spec=- mocha-junit-reporter=./junit-results.xml" echo "$TEST_FILES" | circleci tests run --command="xargs npx mocha mocha --node-option no-experimental-fetch -r test/fetch-polyfill.mjs --reporter mocha-multi --require @babel/register --require test/test.mocha.env --timeout 40000 --no-config" --verbose --split-by=timings

if [[ $? -ne 0 ]]
then
Expand Down

0 comments on commit 87a5590

Please sign in to comment.