Skip to content

Commit 308e9e4

Browse files
committed
ci: Use corsheaders and gunicorn in django2x frontend integration tests
1 parent 4af9d85 commit 308e9e4

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

.circleci/setupAndTestWithFrontendWithDjango2x.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
set -x
12
coreInfo=`curl -s -X GET \
23
"https://api.supertokens.io/0/core/latest?password=$SUPERTOKENS_API_KEY&planType=FREE&mode=DEV&version=$1" \
34
-H 'api-version: 0'`
@@ -50,9 +51,9 @@ cd supertokens-website
5051
git checkout $2
5152
cd ../project/tests/frontendIntegration/django2x
5253
export PYTHONPATH="${PYTHONPATH}:/root/project"
53-
python3 manage.py runserver 8080 &
54+
gunicorn mysite.wsgi --bind 0.0.0.0:8080 &
5455
pid=$!
55-
python3 manage.py runserver 8082 &
56+
gunicorn mysite.wsgi --bind 0.0.0.0:8082 &
5657
pid2=$!
5758
cd ../../../../supertokens-website/test/server
5859
npm i -d

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
"django-cors-headers==2.0",
4343
"django>=2,<3",
4444
"django-stubs==1.9.0",
45+
"gunicorn==20.1.0",
4546
"python-dotenv==0.19.2",
4647
]
4748
),

tests/frontendIntegration/django2x/mysite/settings.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@
6161
# Application definition
6262

6363
INSTALLED_APPS = [
64+
"corsheaders", # Add corsheaders django app
6465
"django.contrib.admin",
6566
"django.contrib.auth",
6667
"django.contrib.contenttypes",

0 commit comments

Comments
 (0)