Skip to content

Commit 54c12f2

Browse files
fix: changelog and tests (#538)
* initial commit for changelog copied from node sdk * fix: changelog re-org * fix: snippet in changelog * fix: parallise flask website * fix: parallelise all website tests * fix: auth react tests * fix: unit test * fix: tp json * fix: tp json * fix: tp json * fix: tp json --------- Co-authored-by: rishabhpoddar <[email protected]>
1 parent f7a02bc commit 54c12f2

21 files changed

+977
-495
lines changed

.circleci/config_continue.yml

Lines changed: 53 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -62,45 +62,61 @@ jobs:
6262
docker:
6363
- image: rishabhpoddar/supertokens_python_driver_testing
6464
resource_class: large
65+
parameters:
66+
fdi-version:
67+
type: string
68+
parallelism: 4
6569
steps:
6670
- checkout
6771
- run: update-alternatives --install "/usr/bin/java" "java" "/usr/java/jdk-15.0.1/bin/java" 2
6872
- run: update-alternatives --install "/usr/bin/javac" "javac" "/usr/java/jdk-15.0.1/bin/javac" 2
6973
- run: git config --global url."https://github.com/".insteadOf ssh://[email protected]/
7074
- run: echo "127.0.0.1 localhost.org" >> /etc/hosts
7175
- run: make with-fastapi
72-
- run: (cd .circleci/ && ./websiteFastApi.sh)
76+
- run: (cd .circleci/ && ./websiteFastApi.sh << parameters.fdi-version >>)
7377
- slack/status
7478
test-website-flask:
7579
docker:
7680
- image: rishabhpoddar/supertokens_python_driver_testing
7781
resource_class: large
82+
parameters:
83+
fdi-version:
84+
type: string
85+
parallelism: 4
7886
steps:
7987
- checkout
8088
- run: update-alternatives --install "/usr/bin/java" "java" "/usr/java/jdk-15.0.1/bin/java" 2
8189
- run: update-alternatives --install "/usr/bin/javac" "javac" "/usr/java/jdk-15.0.1/bin/javac" 2
8290
- run: git config --global url."https://github.com/".insteadOf ssh://[email protected]/
8391
- run: echo "127.0.0.1 localhost.org" >> /etc/hosts
8492
- run: make with-flask
85-
- run: (cd .circleci/ && ./websiteFlask.sh)
93+
- run: (cd .circleci/ && ./websiteFlask.sh << parameters.fdi-version >>)
8694
- slack/status
8795
test-website-django:
8896
docker:
8997
- image: rishabhpoddar/supertokens_python_driver_testing
9098
resource_class: large
99+
parameters:
100+
fdi-version:
101+
type: string
102+
parallelism: 4
91103
steps:
92104
- checkout
93105
- run: update-alternatives --install "/usr/bin/java" "java" "/usr/java/jdk-15.0.1/bin/java" 2
94106
- run: update-alternatives --install "/usr/bin/javac" "javac" "/usr/java/jdk-15.0.1/bin/javac" 2
95107
- run: git config --global url."https://github.com/".insteadOf ssh://[email protected]/
96108
- run: echo "127.0.0.1 localhost.org" >> /etc/hosts
97109
- run: make with-django
98-
- run: (cd .circleci/ && ./websiteDjango.sh)
110+
- run: (cd .circleci/ && ./websiteDjango.sh << parameters.fdi-version >>)
99111
- slack/status
100112
test-website-drf-async:
101113
docker:
102114
- image: rishabhpoddar/supertokens_python_driver_testing
103115
resource_class: large
116+
parameters:
117+
fdi-version:
118+
type: string
119+
parallelism: 4
104120
steps:
105121
- checkout
106122
- run: update-alternatives --install "/usr/bin/java" "java" "/usr/java/jdk-15.0.1/bin/java" 2
@@ -114,12 +130,16 @@ jobs:
114130
- run: echo "alias pip3='python -m pip'" >> ~/.bashrc
115131
- run: echo "127.0.0.1 localhost.org" >> /etc/hosts
116132
- run: make with-drf
117-
- run: (cd .circleci/ && ./websiteDrfAsync.sh)
133+
- run: (cd .circleci/ && ./websiteDrfAsync.sh << parameters.fdi-version >>)
118134
- slack/status
119135
test-website-drf-sync:
120136
docker:
121137
- image: rishabhpoddar/supertokens_python_driver_testing
122138
resource_class: large
139+
parameters:
140+
fdi-version:
141+
type: string
142+
parallelism: 4
123143
steps:
124144
- checkout
125145
- run: update-alternatives --install "/usr/bin/java" "java" "/usr/java/jdk-15.0.1/bin/java" 2
@@ -133,27 +153,35 @@ jobs:
133153
- run: echo "alias pip3='python -m pip'" >> ~/.bashrc
134154
- run: echo "127.0.0.1 localhost.org" >> /etc/hosts
135155
- run: make with-drf
136-
- run: (cd .circleci/ && ./websiteDrfSync.sh)
156+
- run: (cd .circleci/ && ./websiteDrfSync.sh << parameters.fdi-version >>)
137157
- slack/status
138158
test-website-django2x:
139159
docker:
140160
- image: rishabhpoddar/supertokens_python_driver_testing
141161
resource_class: large
162+
parameters:
163+
fdi-version:
164+
type: string
165+
parallelism: 4
142166
steps:
143167
- checkout
144168
- run: update-alternatives --install "/usr/bin/java" "java" "/usr/java/jdk-15.0.1/bin/java" 2
145169
- run: update-alternatives --install "/usr/bin/javac" "javac" "/usr/java/jdk-15.0.1/bin/javac" 2
146170
- run: git config --global url."https://github.com/".insteadOf ssh://[email protected]/
147171
- run: echo "127.0.0.1 localhost.org" >> /etc/hosts
148172
- run: make with-django2x
149-
- run: (cd .circleci/ && ./websiteDjango2x.sh)
173+
- run: (cd .circleci/ && ./websiteDjango2x.sh << parameters.fdi-version >>)
150174
- slack/status
151175
test-website-flask-nest-asyncio:
152176
docker:
153177
- image: rishabhpoddar/supertokens_python_driver_testing
154178
resource_class: large
155179
environment:
156180
SUPERTOKENS_NEST_ASYNCIO: "1"
181+
parameters:
182+
fdi-version:
183+
type: string
184+
parallelism: 4
157185
steps:
158186
- checkout
159187
- run: update-alternatives --install "/usr/bin/java" "java" "/usr/java/jdk-15.0.1/bin/java" 2
@@ -162,7 +190,7 @@ jobs:
162190
- run: echo "127.0.0.1 localhost.org" >> /etc/hosts
163191
- run: make with-flask
164192
- run: python -m pip install nest-asyncio
165-
- run: (cd .circleci/ && ./websiteFlask.sh)
193+
- run: (cd .circleci/ && ./websiteFlask.sh << parameters.fdi-version >>)
166194
- slack/status
167195
test-authreact-fastapi:
168196
docker:
@@ -306,6 +334,9 @@ workflows:
306334
- test-dev-tag-as-not-passed
307335
context:
308336
- slack-notification
337+
matrix:
338+
parameters:
339+
fdi-version: placeholder
309340
filters:
310341
tags:
311342
only: /dev-v[0-9]+(\.[0-9]+)*/
@@ -316,6 +347,9 @@ workflows:
316347
- test-dev-tag-as-not-passed
317348
context:
318349
- slack-notification
350+
matrix:
351+
parameters:
352+
fdi-version: placeholder
319353
filters:
320354
tags:
321355
only: /dev-v[0-9]+(\.[0-9]+)*/
@@ -326,6 +360,9 @@ workflows:
326360
- test-dev-tag-as-not-passed
327361
context:
328362
- slack-notification
363+
matrix:
364+
parameters:
365+
fdi-version: placeholder
329366
filters:
330367
tags:
331368
only: /dev-v[0-9]+(\.[0-9]+)*/
@@ -336,6 +373,9 @@ workflows:
336373
- test-dev-tag-as-not-passed
337374
context:
338375
- slack-notification
376+
matrix:
377+
parameters:
378+
fdi-version: placeholder
339379
filters:
340380
tags:
341381
only: /dev-v[0-9]+(\.[0-9]+)*/
@@ -346,6 +386,9 @@ workflows:
346386
- test-dev-tag-as-not-passed
347387
context:
348388
- slack-notification
389+
matrix:
390+
parameters:
391+
fdi-version: placeholder
349392
filters:
350393
tags:
351394
only: /dev-v[0-9]+(\.[0-9]+)*/
@@ -356,6 +399,9 @@ workflows:
356399
- test-dev-tag-as-not-passed
357400
context:
358401
- slack-notification
402+
matrix:
403+
parameters:
404+
fdi-version: placeholder
359405
filters:
360406
tags:
361407
only: /dev-v[0-9]+(\.[0-9]+)*/

.circleci/setupAndTestWithFrontend.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,13 @@ npm i git+https://github.com:supertokens/supertokens-node.git#$3
5959
npm i
6060
cd ../../
6161
npm i
62-
SUPERTOKENS_CORE_TAG=$coreTag NODE_PORT=8081 INSTALL_PATH=../supertokens-root npm test
62+
63+
if ! [[ -z "${CIRCLE_NODE_TOTAL}" ]]; then
64+
TEST_MODE=testing SUPERTOKENS_CORE_TAG=$coreTag NODE_PORT=8081 INSTALL_PATH=../supertokens-root npx mocha --exit --no-config --require isomorphic-fetch --timeout 500000 $(npx mocha-split-tests -r ./runtime.log -t $CIRCLE_NODE_TOTAL -g $CIRCLE_NODE_INDEX -f 'test/*.test.js')
65+
else
66+
TEST_MODE=testing SUPERTOKENS_CORE_TAG=$coreTag NODE_PORT=8081 INSTALL_PATH=../supertokens-root npm test
67+
fi
68+
6369
if [[ $? -ne 0 ]]
6470
then
6571
echo "test failed... killing $pid, $pid2 and exiting!"

.circleci/setupAndTestWithFrontendWithDjango.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,13 @@ npm i git+https://github.com:supertokens/supertokens-node.git#$3
5959
npm i
6060
cd ../../
6161
npm i
62-
SUPERTOKENS_CORE_TAG=$coreTag NODE_PORT=8081 INSTALL_PATH=../supertokens-root npm test
62+
63+
if ! [[ -z "${CIRCLE_NODE_TOTAL}" ]]; then
64+
TEST_MODE=testing SUPERTOKENS_CORE_TAG=$coreTag NODE_PORT=8081 INSTALL_PATH=../supertokens-root npx mocha --exit --no-config --require isomorphic-fetch --timeout 500000 $(npx mocha-split-tests -r ./runtime.log -t $CIRCLE_NODE_TOTAL -g $CIRCLE_NODE_INDEX -f 'test/*.test.js')
65+
else
66+
TEST_MODE=testing SUPERTOKENS_CORE_TAG=$coreTag NODE_PORT=8081 INSTALL_PATH=../supertokens-root npm test
67+
fi
68+
6369
if [[ $? -ne 0 ]]
6470
then
6571
echo "test failed... killing $pid, $pid2 and exiting!"

.circleci/setupAndTestWithFrontendWithDjango2x.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,13 @@ npm i git+https://github.com:supertokens/supertokens-node.git#$3
5959
npm i
6060
cd ../../
6161
npm i
62-
SUPERTOKENS_CORE_TAG=$coreTag NODE_PORT=8081 INSTALL_PATH=../supertokens-root npm test
62+
63+
if ! [[ -z "${CIRCLE_NODE_TOTAL}" ]]; then
64+
TEST_MODE=testing SUPERTOKENS_CORE_TAG=$coreTag NODE_PORT=8081 INSTALL_PATH=../supertokens-root npx mocha --exit --no-config --require isomorphic-fetch --timeout 500000 $(npx mocha-split-tests -r ./runtime.log -t $CIRCLE_NODE_TOTAL -g $CIRCLE_NODE_INDEX -f 'test/*.test.js')
65+
else
66+
TEST_MODE=testing SUPERTOKENS_CORE_TAG=$coreTag NODE_PORT=8081 INSTALL_PATH=../supertokens-root npm test
67+
fi
68+
6369
if [[ $? -ne 0 ]]
6470
then
6571
echo "test failed... killing $pid, $pid2 and exiting!"

.circleci/setupAndTestWithFrontendWithDrfAsync.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,13 @@ npm i git+https://github.com:supertokens/supertokens-node.git#$3
5959
npm i
6060
cd ../../
6161
npm i
62-
SUPERTOKENS_CORE_TAG=$coreTag NODE_PORT=8081 INSTALL_PATH=../supertokens-root npm test
62+
63+
if ! [[ -z "${CIRCLE_NODE_TOTAL}" ]]; then
64+
TEST_MODE=testing SUPERTOKENS_CORE_TAG=$coreTag NODE_PORT=8081 INSTALL_PATH=../supertokens-root npx mocha --exit --no-config --require isomorphic-fetch --timeout 500000 $(npx mocha-split-tests -r ./runtime.log -t $CIRCLE_NODE_TOTAL -g $CIRCLE_NODE_INDEX -f 'test/*.test.js')
65+
else
66+
TEST_MODE=testing SUPERTOKENS_CORE_TAG=$coreTag NODE_PORT=8081 INSTALL_PATH=../supertokens-root npm test
67+
fi
68+
6369
if [[ $? -ne 0 ]]
6470
then
6571
echo "test failed... killing $pid, $pid2 and exiting!"

.circleci/setupAndTestWithFrontendWithDrfSync.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,13 @@ npm i git+https://github.com:supertokens/supertokens-node.git#$3
5959
npm i
6060
cd ../../
6161
npm i
62-
SUPERTOKENS_CORE_TAG=$coreTag NODE_PORT=8081 INSTALL_PATH=../supertokens-root npm test
62+
63+
if ! [[ -z "${CIRCLE_NODE_TOTAL}" ]]; then
64+
TEST_MODE=testing SUPERTOKENS_CORE_TAG=$coreTag NODE_PORT=8081 INSTALL_PATH=../supertokens-root npx mocha --exit --no-config --require isomorphic-fetch --timeout 500000 $(npx mocha-split-tests -r ./runtime.log -t $CIRCLE_NODE_TOTAL -g $CIRCLE_NODE_INDEX -f 'test/*.test.js')
65+
else
66+
TEST_MODE=testing SUPERTOKENS_CORE_TAG=$coreTag NODE_PORT=8081 INSTALL_PATH=../supertokens-root npm test
67+
fi
68+
6369
if [[ $? -ne 0 ]]
6470
then
6571
echo "test failed... killing $pid, $pid2 and exiting!"

.circleci/setupAndTestWithFrontendWithFlask.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,13 @@ npm i git+https://github.com:supertokens/supertokens-node.git#$3
5959
npm i
6060
cd ../../
6161
npm i
62-
SUPERTOKENS_CORE_TAG=$coreTag NODE_PORT=8081 INSTALL_PATH=../supertokens-root npm test
62+
63+
if ! [[ -z "${CIRCLE_NODE_TOTAL}" ]]; then
64+
TEST_MODE=testing SUPERTOKENS_CORE_TAG=$coreTag NODE_PORT=8081 INSTALL_PATH=../supertokens-root npx mocha --exit --no-config --require isomorphic-fetch --timeout 500000 $(npx mocha-split-tests -r ./runtime.log -t $CIRCLE_NODE_TOTAL -g $CIRCLE_NODE_INDEX -f 'test/*.test.js')
65+
else
66+
TEST_MODE=testing SUPERTOKENS_CORE_TAG=$coreTag NODE_PORT=8081 INSTALL_PATH=../supertokens-root npm test
67+
fi
68+
6369
if [[ $? -ne 0 ]]
6470
then
6571
echo "test failed... killing $pid, $pid2 and exiting!"

0 commit comments

Comments
 (0)