doc: update docs for v0.30.3 tag #171
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Website Tests" | |
on: | |
pull_request: | |
types: | |
- opened | |
- reopened | |
- synchronize | |
push: | |
tags: | |
- dev-v[0-9]+.[0-9]+.[0-9]+ | |
# Only one instance of this workflow will run on the same ref (PR/Branch/Tag) | |
# Previous runs will be cancelled. | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
define-versions: | |
runs-on: ubuntu-latest | |
outputs: | |
fdiVersions: ${{ steps.versions.outputs.fdiVersions }} | |
cdiVersions: ${{ steps.versions.outputs.cdiVersions }} | |
pyVersions: '["3.8", "3.13"]' | |
nodeFdiVersionMap: ${{ steps.node-versions.outputs.fdiVersions }} | |
websiteFdiVersionMap: ${{ steps.website-versions.outputs.fdiVersions }} | |
coreCdiVersionMap: ${{ steps.core-versions.outputs.cdiVersions }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: supertokens/get-supported-versions-action@main | |
id: versions | |
with: | |
has-fdi: true | |
has-cdi: true | |
- uses: supertokens/actions/get-versions-from-repo@main | |
id: website-versions | |
with: | |
repo: supertokens-website | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
fdi-versions: ${{ steps.versions.outputs.fdiVersions }} | |
- uses: supertokens/actions/get-versions-from-repo@main | |
id: node-versions | |
with: | |
repo: supertokens-node | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
fdi-versions: ${{ steps.versions.outputs.fdiVersions }} | |
- uses: supertokens/actions/get-versions-from-repo@main | |
id: core-versions | |
with: | |
repo: supertokens-core | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
cdi-versions: ${{steps.versions.outputs.cdiVersions }} | |
test: | |
runs-on: ubuntu-latest | |
needs: define-versions | |
strategy: | |
fail-fast: false | |
matrix: | |
py-version: ${{ fromJSON(needs.define-versions.outputs.pyVersions) }} | |
fdi-version: ${{ fromJSON(needs.define-versions.outputs.fdiVersions) }} | |
framework: | |
- django2x | |
- django3x | |
- drf_sync | |
- drf_async | |
- fastapi | |
- flask | |
- flask-nest-asyncio | |
steps: | |
- name: Setup ENVs | |
id: envs | |
run: | | |
APP_SERVER_LOG_DIR=${{ github.workspace }}/logs | |
echo "APP_SERVER_LOG_DIR=$APP_SERVER_LOG_DIR" | tee -a "$GITHUB_OUTPUT" "$GITHUB_ENV" | |
mkdir -p $APP_SERVER_LOG_DIR | |
- uses: actions/checkout@v4 | |
with: | |
# Checking out to a custom path since the test repo will also be cloned | |
path: supertokens-python | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.py-version }} | |
- name: Get versions from current FDI/CDI version | |
id: versions | |
run: | | |
latestCdiVersion=$(echo '${{ needs.define-versions.outputs.cdiVersions }}' | jq -r '.[-1]' | sed -e 's/"/\\"/g') | |
coreVersion=$(echo '${{ needs.define-versions.outputs.coreCdiVersionMap }}' | jq -r ".[\"$latestCdiVersion\"]") | |
nodeVersion=$(echo '${{ needs.define-versions.outputs.nodeFdiVersionMap }}' | jq -r '.["${{ matrix.fdi-version }}"]') | |
websiteVersion=$(echo '${{ needs.define-versions.outputs.websiteFdiVersionMap }}' | jq -r '.["${{ matrix.fdi-version }}"]') | |
echo "coreVersion=${coreVersion}" >> $GITHUB_OUTPUT | |
echo "nodeVersion=${nodeVersion}" >> $GITHUB_OUTPUT | |
echo "websiteVersion=${websiteVersion}" >> $GITHUB_OUTPUT | |
- name: Start core | |
working-directory: supertokens-python | |
env: | |
SUPERTOKENS_CORE_VERSION: ${{ steps.versions.outputs.coreVersion }} | |
run: docker compose up --wait | |
- name: Setup venv | |
working-directory: supertokens-python | |
run: | | |
python3 -m venv venv | |
source venv/bin/activate | |
python3 -m pip install pip setuptools --upgrade | |
- name: Install dependencies and start servers (django2x) | |
if: matrix.framework == 'django2x' | |
working-directory: supertokens-python | |
run: | | |
source venv/bin/activate | |
make with-django2x | |
# Django2 uses `cgi`, deprecated in 3.13 | |
if [ ${{ matrix.py-version == '3.13' }} ]; then | |
pip install legacy-cgi | |
fi | |
export PYTHONPATH="${PYTHONPATH}:$(pwd)" | |
cd tests/frontendIntegration/django2x | |
gunicorn mysite.wsgi --bind 0.0.0.0:8080 &> ${{ steps.envs.outputs.APP_SERVER_LOG_DIR }}/app-server.log & | |
gunicorn mysite.wsgi --bind 0.0.0.0:8082 &> ${{ steps.envs.outputs.APP_SERVER_LOG_DIR }}/app-server-cross-domain.log & | |
- name: Install dependencies and start servers (django3x) | |
if: matrix.framework == 'django3x' | |
working-directory: supertokens-python | |
run: | | |
source venv/bin/activate | |
make with-django | |
export PYTHONPATH="${PYTHONPATH}:$(pwd)" | |
cd tests/frontendIntegration/django3x | |
uvicorn mysite.asgi:application --port 8080 &> ${{ steps.envs.outputs.APP_SERVER_LOG_DIR }}/app-server.log & | |
uvicorn mysite.asgi:application --port 8082 &> ${{ steps.envs.outputs.APP_SERVER_LOG_DIR }}/app-server-cross-domain.log & | |
- name: Install dependencies and start servers (drf_sync) | |
if: matrix.framework == 'drf_sync' | |
working-directory: supertokens-python | |
run: | | |
source venv/bin/activate | |
make with-drf | |
export PYTHONPATH="${PYTHONPATH}:$(pwd)" | |
cd tests/frontendIntegration/drf_sync | |
gunicorn mysite.wsgi --bind 0.0.0.0:8080 &> ${{ steps.envs.outputs.APP_SERVER_LOG_DIR }}/app-server.log & | |
gunicorn mysite.wsgi --bind 0.0.0.0:8082 &> ${{ steps.envs.outputs.APP_SERVER_LOG_DIR }}/app-server-cross-domain.log & | |
- name: Install dependencies and start servers (drf_async) | |
if: matrix.framework == 'drf_async' | |
working-directory: supertokens-python | |
run: | | |
source venv/bin/activate | |
make with-drf | |
export PYTHONPATH="${PYTHONPATH}:$(pwd)" | |
cd tests/frontendIntegration/drf_async | |
uvicorn mysite.asgi:application --port 8080 &> ${{ steps.envs.outputs.APP_SERVER_LOG_DIR }}/app-server.log & | |
uvicorn mysite.asgi:application --port 8082 &> ${{ steps.envs.outputs.APP_SERVER_LOG_DIR }}/app-server-cross-domain.log & | |
- name: Install dependencies and start servers (fastapi) | |
if: matrix.framework == 'fastapi' | |
working-directory: supertokens-python | |
run: | | |
source venv/bin/activate | |
make with-fastapi | |
export PYTHONPATH="${PYTHONPATH}:$(pwd)" | |
cd tests/frontendIntegration/fastapi-server | |
uvicorn app:app --host 0.0.0.0 --port 8080 &> ${{ steps.envs.outputs.APP_SERVER_LOG_DIR }}/app-server.log & | |
uvicorn app:app --host 0.0.0.0 --port 8082 &> ${{ steps.envs.outputs.APP_SERVER_LOG_DIR }}/app-server-cross-domain.log & | |
- name: Install dependencies and start servers (flask) | |
if: matrix.framework == 'flask' | |
working-directory: supertokens-python | |
run: | | |
source venv/bin/activate | |
make with-flask | |
export PYTHONPATH="${PYTHONPATH}:$(pwd)" | |
cd tests/frontendIntegration/flask-server | |
python3 app.py --port 8080 &> ${{ steps.envs.outputs.APP_SERVER_LOG_DIR }}/app-server.log & | |
python3 app.py --port 8082 &> ${{ steps.envs.outputs.APP_SERVER_LOG_DIR }}/app-server-cross-domain.log & | |
- name: Install dependencies and start servers (flask-nest-asyncio) | |
if: matrix.framework == 'flask-nest-asyncio' | |
working-directory: supertokens-python | |
run: | | |
source venv/bin/activate | |
make with-flask | |
python -m pip install nest-asyncio | |
export PYTHONPATH="${PYTHONPATH}:$(pwd)" | |
cd tests/frontendIntegration/flask-server | |
python3 app.py --port 8080 &> ${{ steps.envs.outputs.APP_SERVER_LOG_DIR }}/app-server.log & | |
python3 app.py --port 8082 &> ${{ steps.envs.outputs.APP_SERVER_LOG_DIR }}/app-server-cross-domain.log & | |
- uses: supertokens/website-testing-action@main | |
with: | |
version: ${{ steps.versions.outputs.websiteVersion }} | |
node-sdk-version: ${{ steps.versions.outputs.nodeVersion }} | |
path: supertokens-website | |
check-name-suffix: '[Py=${{ matrix.py-version }}][FDI=${{ matrix.fdi-version }}][Framework=${{ matrix.framework }}]' | |
app-server-logs: ${{ steps.envs.outputs.APP_SERVER_LOG_DIR }} |