Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 25 additions & 8 deletions .github/workflows/auth-react-test-1-django.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ jobs:
fdiVersions: ${{ steps.versions.outputs.fdiVersions }}
cdiVersions: ${{ steps.versions.outputs.cdiVersions }}
pyVersions: '["3.8", "3.13"]'
nodeFdiVersionMap: ${{ steps.node-versions.outputs.fdiVersions }}
authReactFdiVersionMap: ${{ steps.auth-react-versions.outputs.fdiVersions }}
steps:
- uses: actions/checkout@v4

Expand All @@ -32,6 +34,20 @@ jobs:
has-fdi: true
has-cdi: true

- uses: supertokens/actions/get-versions-from-repo@main
id: auth-react-versions
with:
repo: supertokens-auth-react
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 }}

setup-auth-react:
runs-on: ubuntu-latest
needs: define-versions
Expand All @@ -51,19 +67,20 @@ jobs:
matrix: ${{ steps.setup-matrix.outputs.matrix }}

steps:
- uses: supertokens/get-versions-action@main
- name: Get node and auth-react versions for FDI
id: versions
with:
driver-name: python
fdi-version: ${{ matrix.fdi-version }}
env:
SUPERTOKENS_API_KEY: ${{ secrets.SUPERTOKENS_API_KEY }}
run: |
nodeVersion=$( echo '${{ needs.define-versions.outputs.nodeFdiVersionMap }}' | jq -r '.["${{ matrix.fdi-version }}"]' )
authReactVersion=$( echo '${{ needs.define-versions.outputs.authReactFdiVersionMap }}' | jq -r '.["${{ matrix.fdi-version }}"]' )

echo "nodeVersion=${nodeVersion}" >> $GITHUB_OUTPUT
echo "authReactVersion=${authReactVersion}" >> $GITHUB_OUTPUT

- uses: supertokens/auth-react-testing-action/setup@main
id: envs
with:
auth-react-version: ${{ steps.versions.outputs.authReactVersionXy }}
node-sdk-version: ${{ steps.versions.outputs.nodeTag }}
auth-react-version: ${{ steps.versions.outputs.authReactVersion }}
node-sdk-version: ${{ steps.versions.outputs.nodeVersion }}
fdi-version: ${{ matrix.fdi-version }}

- id: setup-matrix
Expand Down
33 changes: 25 additions & 8 deletions .github/workflows/auth-react-test-1-fastapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ jobs:
fdiVersions: ${{ steps.versions.outputs.fdiVersions }}
cdiVersions: ${{ steps.versions.outputs.cdiVersions }}
pyVersions: '["3.8", "3.13"]'
nodeFdiVersionMap: ${{ steps.node-versions.outputs.fdiVersions }}
authReactFdiVersionMap: ${{ steps.auth-react-versions.outputs.fdiVersions }}
steps:
- uses: actions/checkout@v4

Expand All @@ -32,6 +34,20 @@ jobs:
has-fdi: true
has-cdi: true

- uses: supertokens/actions/get-versions-from-repo@main
id: auth-react-versions
with:
repo: supertokens-auth-react
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 }}

setup-auth-react:
runs-on: ubuntu-latest
needs: define-versions
Expand All @@ -51,19 +67,20 @@ jobs:
matrix: ${{ steps.setup-matrix.outputs.matrix }}

steps:
- uses: supertokens/get-versions-action@main
- name: Get node and auth-react versions for FDI
id: versions
with:
driver-name: python
fdi-version: ${{ matrix.fdi-version }}
env:
SUPERTOKENS_API_KEY: ${{ secrets.SUPERTOKENS_API_KEY }}
run: |
nodeVersion=$( echo '${{ needs.define-versions.outputs.nodeFdiVersionMap }}' | jq -r '.["${{ matrix.fdi-version }}"]' )
authReactVersion=$( echo '${{ needs.define-versions.outputs.authReactFdiVersionMap }}' | jq -r '.["${{ matrix.fdi-version }}"]' )

echo "nodeVersion=${nodeVersion}" >> $GITHUB_OUTPUT
echo "authReactVersion=${authReactVersion}" >> $GITHUB_OUTPUT

- uses: supertokens/auth-react-testing-action/setup@main
id: envs
with:
auth-react-version: ${{ steps.versions.outputs.authReactVersionXy }}
node-sdk-version: ${{ steps.versions.outputs.nodeTag }}
auth-react-version: ${{ steps.versions.outputs.authReactVersion }}
node-sdk-version: ${{ steps.versions.outputs.nodeVersion }}
fdi-version: ${{ matrix.fdi-version }}

- id: setup-matrix
Expand Down
33 changes: 25 additions & 8 deletions .github/workflows/auth-react-test-1-flask.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ jobs:
fdiVersions: ${{ steps.versions.outputs.fdiVersions }}
cdiVersions: ${{ steps.versions.outputs.cdiVersions }}
pyVersions: '["3.8", "3.13"]'
nodeFdiVersionMap: ${{ steps.node-versions.outputs.fdiVersions }}
authReactFdiVersionMap: ${{ steps.auth-react-versions.outputs.fdiVersions }}
steps:
- uses: actions/checkout@v4

Expand All @@ -32,6 +34,20 @@ jobs:
has-fdi: true
has-cdi: true

- uses: supertokens/actions/get-versions-from-repo@main
id: auth-react-versions
with:
repo: supertokens-auth-react
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 }}

setup-auth-react:
runs-on: ubuntu-latest
needs: define-versions
Expand All @@ -51,19 +67,20 @@ jobs:
matrix: ${{ steps.setup-matrix.outputs.matrix }}

steps:
- uses: supertokens/get-versions-action@main
- name: Get node and auth-react versions for FDI
id: versions
with:
driver-name: python
fdi-version: ${{ matrix.fdi-version }}
env:
SUPERTOKENS_API_KEY: ${{ secrets.SUPERTOKENS_API_KEY }}
run: |
nodeVersion=$( echo '${{ needs.define-versions.outputs.nodeFdiVersionMap }}' | jq -r '.["${{ matrix.fdi-version }}"]' )
authReactVersion=$( echo '${{ needs.define-versions.outputs.authReactFdiVersionMap }}' | jq -r '.["${{ matrix.fdi-version }}"]' )

echo "nodeVersion=${nodeVersion}" >> $GITHUB_OUTPUT
echo "authReactVersion=${authReactVersion}" >> $GITHUB_OUTPUT

- uses: supertokens/auth-react-testing-action/setup@main
id: envs
with:
auth-react-version: ${{ steps.versions.outputs.authReactVersionXy }}
node-sdk-version: ${{ steps.versions.outputs.nodeTag }}
auth-react-version: ${{ steps.versions.outputs.authReactVersion }}
node-sdk-version: ${{ steps.versions.outputs.nodeVersion }}
fdi-version: ${{ matrix.fdi-version }}

- id: setup-matrix
Expand Down
24 changes: 24 additions & 0 deletions .github/workflows/auth-react-test-3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,32 @@ jobs:
python3 -m pip install pip setuptools --upgrade
make dev-install && rm -rf src

- name: Get supported Python CDI versions
id: cdi-versions
uses: supertokens/get-supported-versions-action@main
with:
has-cdi: true
working-directory: supertokens-python

- uses: supertokens/actions/get-versions-from-repo@main
id: core-versions
with:
repo: supertokens-core
github-token: ${{ secrets.GITHUB_TOKEN }}
cdi-versions: ${{ steps.cdi-versions.outputs.cdiVersions }}

- name: Get core version from latest Python CDI version
id: core-version
run: |
lastPythonCdiVersion=$(echo '${{ steps.cdi-versions.outputs.cdiVersions }}' | jq -r '.[-1]') | sed -e 's/"/\\"/g'
coreVersion=$(echo '${{ steps.core-versions.outputs.cdiVersions }}' | jq -r ".[$lastPythonCdiVersion]")

echo "coreVersion=${coreVersion}" >> $GITHUB_OUTPUT

- name: Start core
working-directory: supertokens-python
env:
SUPERTOKENS_CORE_VERSION: ${{ steps.core-version.outputs.coreVersion }}
run: docker compose up --wait

- name: Start Server (django)
Expand Down
26 changes: 16 additions & 10 deletions .github/workflows/backend-sdk-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ jobs:
cdiVersions: ${{ steps.versions.outputs.cdiVersions }}
pyVersions: '["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]'
nodeVersions: '["20"]'
coreCdiVersionMap: ${{ steps.core-versions.outputs.cdiVersions }}
steps:
- uses: actions/checkout@v4

Expand All @@ -33,6 +34,13 @@ jobs:
has-fdi: true
has-cdi: true

- 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
Expand All @@ -56,14 +64,12 @@ jobs:
# Checking out to a custom path since the test repo will also be cloned
path: supertokens-python

- uses: supertokens/get-versions-action@main
id: versions
with:
driver-name: python
cdi-version: ${{ matrix.cdi-version }}
fdi-version: ${{ matrix.fdi-version }}
env:
SUPERTOKENS_API_KEY: ${{ secrets.SUPERTOKENS_API_KEY }}
- name: Get core version from current CDI version
id: core-version
run: |
coreVersion=$(echo '${{ needs.define-versions.outputs.coreCdiVersionMap }}' | jq -r '.["${{ matrix.cdi-version }}"]')

echo "coreVersion=${coreVersion}" >> $GITHUB_OUTPUT

- uses: actions/setup-node@v4
with:
Expand All @@ -82,7 +88,7 @@ jobs:
working-directory: supertokens-python
env:
SUPERTOKENS_ENV: testing
SUPERTOKENS_CORE_VERSION: ${{ steps.versions.outputs.coreVersionXy }}
SUPERTOKENS_CORE_VERSION: ${{ steps.core-version.outputs.coreVersion }}
run: |
source venv/bin/activate
docker compose up --build --wait
Expand All @@ -91,6 +97,6 @@ jobs:
- uses: supertokens/backend-sdk-testing-action@main
with:
version: ${{ matrix.fdi-version }}
check-name-suffix: '[CDI=${{ matrix.cdi-version }}][Core=${{ steps.versions.outputs.coreVersionXy }}][FDI=${{ matrix.fdi-version }}][Py=${{ matrix.py-version }}][Node=${{ matrix.node-version }}]'
check-name-suffix: '[CDI=${{ matrix.cdi-version }}][Core=${{ steps.core-version.outputs.coreVersion }}][FDI=${{ matrix.fdi-version }}][Py=${{ matrix.py-version }}][Node=${{ matrix.node-version }}]'
path: backend-sdk-testing
app-server-logs: ${{ github.workspace }}/supertokens-python/python.log
25 changes: 16 additions & 9 deletions .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ jobs:
fdiVersions: ${{ steps.versions.outputs.fdiVersions }}
cdiVersions: ${{ steps.versions.outputs.cdiVersions }}
pyVersions: '["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]'
coreCdiVersionMap: ${{ steps.core-versions.outputs.cdiVersions }}

steps:
- uses: actions/checkout@v4
Expand All @@ -34,6 +35,13 @@ jobs:
has-fdi: true
has-cdi: true

- 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
Expand All @@ -47,13 +55,12 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: supertokens/get-versions-action@main
id: versions
with:
driver-name: python
cdi-version: ${{ matrix.cdi-version }}
env:
SUPERTOKENS_API_KEY: ${{ secrets.SUPERTOKENS_API_KEY }}
- name: Get core version from current CDI version
id: core-version
run: |
coreVersion=$(echo '${{ needs.define-versions.outputs.coreCdiVersionMap }}' | jq -r '.["${{ matrix.cdi-version }}"]')

echo "coreVersion=${coreVersion}" >> $GITHUB_OUTPUT

- uses: actions/setup-python@v5
with:
Expand All @@ -72,12 +79,12 @@ jobs:
source venv/bin/activate
make test
env:
SUPERTOKENS_CORE_VERSION: ${{ steps.versions.outputs.coreVersionXy }}
SUPERTOKENS_CORE_VERSION: ${{ steps.core-version.outputs.coreVersion }}

- uses: pmeier/pytest-results-action@main
name: Surface failing tests
if: always()
with:
path: test-results/junit.xml
summary: true
title: "[Core=${{ steps.versions.outputs.coreVersionXy }}][py=${{ matrix.py-version }}] Unit Test Results"
title: "[Core=${{ steps.core-version.outputs.coreVersion }}][py=${{ matrix.py-version }}] Unit Test Results"
Loading
Loading