Skip to content

Commit 596eaa5

Browse files
committed
feat: uses new versions action
- Uses `supertokens-dev-postgresql` core image
1 parent e8e58c7 commit 596eaa5

8 files changed

+175
-52
lines changed

.github/workflows/auth-react-test-1-django.yml

Lines changed: 25 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ jobs:
2323
fdiVersions: ${{ steps.versions.outputs.fdiVersions }}
2424
cdiVersions: ${{ steps.versions.outputs.cdiVersions }}
2525
pyVersions: '["3.8", "3.13"]'
26+
nodeFdiVersionMap: ${{ steps.node-versions.outputs.fdiVersions }}
27+
authReactFdiVersionMap: ${{ steps.auth-react-versions.outputs.fdiVersions }}
2628
steps:
2729
- uses: actions/checkout@v4
2830

@@ -32,6 +34,20 @@ jobs:
3234
has-fdi: true
3335
has-cdi: true
3436

37+
- uses: supertokens/actions/get-versions-from-repo@main
38+
id: auth-react-versions
39+
with:
40+
repo: supertokens-auth-react
41+
github-token: ${{ secrets.GITHUB_TOKEN }}
42+
fdi-versions: ${{ steps.versions.outputs.fdiVersions }}
43+
44+
- uses: supertokens/actions/get-versions-from-repo@main
45+
id: node-versions
46+
with:
47+
repo: supertokens-node
48+
github-token: ${{ secrets.GITHUB_TOKEN }}
49+
fdi-versions: ${{ steps.versions.outputs.fdiVersions }}
50+
3551
setup-auth-react:
3652
runs-on: ubuntu-latest
3753
needs: define-versions
@@ -51,19 +67,20 @@ jobs:
5167
matrix: ${{ steps.setup-matrix.outputs.matrix }}
5268

5369
steps:
54-
- uses: supertokens/get-versions-action@main
70+
- name: Get node and auth-react versions for FDI
5571
id: versions
56-
with:
57-
driver-name: python
58-
fdi-version: ${{ matrix.fdi-version }}
59-
env:
60-
SUPERTOKENS_API_KEY: ${{ secrets.SUPERTOKENS_API_KEY }}
72+
run: |
73+
nodeVersion=$( echo '${{ needs.define-versions.outputs.nodeFdiVersionMap }}' | jq -r '.["${{ matrix.fdi-version }}"]' )
74+
authReactVersion=$( echo '${{ needs.define-versions.outputs.authReactFdiVersionMap }}' | jq -r '.["${{ matrix.fdi-version }}"]' )
75+
76+
echo "nodeVersion=${nodeVersion}" >> $GITHUB_OUTPUT
77+
echo "authReactVersion=${authReactVersion}" >> $GITHUB_OUTPUT
6178
6279
- uses: supertokens/auth-react-testing-action/setup@main
6380
id: envs
6481
with:
65-
auth-react-version: ${{ steps.versions.outputs.authReactVersionXy }}
66-
node-sdk-version: ${{ steps.versions.outputs.nodeTag }}
82+
auth-react-version: ${{ steps.versions.outputs.authReactVersion }}
83+
node-sdk-version: ${{ steps.versions.outputs.nodeVersion }}
6784
fdi-version: ${{ matrix.fdi-version }}
6885

6986
- id: setup-matrix

.github/workflows/auth-react-test-1-fastapi.yml

Lines changed: 25 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ jobs:
2323
fdiVersions: ${{ steps.versions.outputs.fdiVersions }}
2424
cdiVersions: ${{ steps.versions.outputs.cdiVersions }}
2525
pyVersions: '["3.8", "3.13"]'
26+
nodeFdiVersionMap: ${{ steps.node-versions.outputs.fdiVersions }}
27+
authReactFdiVersionMap: ${{ steps.auth-react-versions.outputs.fdiVersions }}
2628
steps:
2729
- uses: actions/checkout@v4
2830

@@ -32,6 +34,20 @@ jobs:
3234
has-fdi: true
3335
has-cdi: true
3436

37+
- uses: supertokens/actions/get-versions-from-repo@main
38+
id: auth-react-versions
39+
with:
40+
repo: supertokens-auth-react
41+
github-token: ${{ secrets.GITHUB_TOKEN }}
42+
fdi-versions: ${{ steps.versions.outputs.fdiVersions }}
43+
44+
- uses: supertokens/actions/get-versions-from-repo@main
45+
id: node-versions
46+
with:
47+
repo: supertokens-node
48+
github-token: ${{ secrets.GITHUB_TOKEN }}
49+
fdi-versions: ${{ steps.versions.outputs.fdiVersions }}
50+
3551
setup-auth-react:
3652
runs-on: ubuntu-latest
3753
needs: define-versions
@@ -51,19 +67,20 @@ jobs:
5167
matrix: ${{ steps.setup-matrix.outputs.matrix }}
5268

5369
steps:
54-
- uses: supertokens/get-versions-action@main
70+
- name: Get node and auth-react versions for FDI
5571
id: versions
56-
with:
57-
driver-name: python
58-
fdi-version: ${{ matrix.fdi-version }}
59-
env:
60-
SUPERTOKENS_API_KEY: ${{ secrets.SUPERTOKENS_API_KEY }}
72+
run: |
73+
nodeVersion=$( echo '${{ needs.define-versions.outputs.nodeFdiVersionMap }}' | jq -r '.["${{ matrix.fdi-version }}"]' )
74+
authReactVersion=$( echo '${{ needs.define-versions.outputs.authReactFdiVersionMap }}' | jq -r '.["${{ matrix.fdi-version }}"]' )
75+
76+
echo "nodeVersion=${nodeVersion}" >> $GITHUB_OUTPUT
77+
echo "authReactVersion=${authReactVersion}" >> $GITHUB_OUTPUT
6178
6279
- uses: supertokens/auth-react-testing-action/setup@main
6380
id: envs
6481
with:
65-
auth-react-version: ${{ steps.versions.outputs.authReactVersionXy }}
66-
node-sdk-version: ${{ steps.versions.outputs.nodeTag }}
82+
auth-react-version: ${{ steps.versions.outputs.authReactVersion }}
83+
node-sdk-version: ${{ steps.versions.outputs.nodeVersion }}
6784
fdi-version: ${{ matrix.fdi-version }}
6885

6986
- id: setup-matrix

.github/workflows/auth-react-test-1-flask.yml

Lines changed: 25 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ jobs:
2323
fdiVersions: ${{ steps.versions.outputs.fdiVersions }}
2424
cdiVersions: ${{ steps.versions.outputs.cdiVersions }}
2525
pyVersions: '["3.8", "3.13"]'
26+
nodeFdiVersionMap: ${{ steps.node-versions.outputs.fdiVersions }}
27+
authReactFdiVersionMap: ${{ steps.auth-react-versions.outputs.fdiVersions }}
2628
steps:
2729
- uses: actions/checkout@v4
2830

@@ -32,6 +34,20 @@ jobs:
3234
has-fdi: true
3335
has-cdi: true
3436

37+
- uses: supertokens/actions/get-versions-from-repo@main
38+
id: auth-react-versions
39+
with:
40+
repo: supertokens-auth-react
41+
github-token: ${{ secrets.GITHUB_TOKEN }}
42+
fdi-versions: ${{ steps.versions.outputs.fdiVersions }}
43+
44+
- uses: supertokens/actions/get-versions-from-repo@main
45+
id: node-versions
46+
with:
47+
repo: supertokens-node
48+
github-token: ${{ secrets.GITHUB_TOKEN }}
49+
fdi-versions: ${{ steps.versions.outputs.fdiVersions }}
50+
3551
setup-auth-react:
3652
runs-on: ubuntu-latest
3753
needs: define-versions
@@ -51,19 +67,20 @@ jobs:
5167
matrix: ${{ steps.setup-matrix.outputs.matrix }}
5268

5369
steps:
54-
- uses: supertokens/get-versions-action@main
70+
- name: Get node and auth-react versions for FDI
5571
id: versions
56-
with:
57-
driver-name: python
58-
fdi-version: ${{ matrix.fdi-version }}
59-
env:
60-
SUPERTOKENS_API_KEY: ${{ secrets.SUPERTOKENS_API_KEY }}
72+
run: |
73+
nodeVersion=$( echo '${{ needs.define-versions.outputs.nodeFdiVersionMap }}' | jq -r '.["${{ matrix.fdi-version }}"]' )
74+
authReactVersion=$( echo '${{ needs.define-versions.outputs.authReactFdiVersionMap }}' | jq -r '.["${{ matrix.fdi-version }}"]' )
75+
76+
echo "nodeVersion=${nodeVersion}" >> $GITHUB_OUTPUT
77+
echo "authReactVersion=${authReactVersion}" >> $GITHUB_OUTPUT
6178
6279
- uses: supertokens/auth-react-testing-action/setup@main
6380
id: envs
6481
with:
65-
auth-react-version: ${{ steps.versions.outputs.authReactVersionXy }}
66-
node-sdk-version: ${{ steps.versions.outputs.nodeTag }}
82+
auth-react-version: ${{ steps.versions.outputs.authReactVersion }}
83+
node-sdk-version: ${{ steps.versions.outputs.nodeVersion }}
6784
fdi-version: ${{ matrix.fdi-version }}
6885

6986
- id: setup-matrix

.github/workflows/auth-react-test-3.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,32 @@ jobs:
8383
python3 -m pip install pip setuptools --upgrade
8484
make dev-install && rm -rf src
8585
86+
- name: Get supported Python CDI versions
87+
id: cdi-versions
88+
uses: supertokens/get-supported-versions-action@main
89+
with:
90+
has-cdi: true
91+
working-directory: supertokens-python
92+
93+
- uses: supertokens/actions/get-versions-from-repo@main
94+
id: core-versions
95+
with:
96+
repo: supertokens-core
97+
github-token: ${{ secrets.GITHUB_TOKEN }}
98+
cdi-versions: ${{ steps.cdi-versions.outputs.cdiVersions }}
99+
100+
- name: Get core version from latest Python CDI version
101+
id: core-version
102+
run: |
103+
lastPythonCdiVersion=$(echo '${{ steps.cdi-versions.outputs.cdiVersions }}' | jq -r '.[-1]' | sed -e 's/"/\\"/g')
104+
coreVersion=$(echo '${{ steps.core-versions.outputs.cdiVersions }}' | jq -r ".[\"$lastPythonCdiVersion\"]")
105+
106+
echo "coreVersion=${coreVersion}" >> $GITHUB_OUTPUT
107+
86108
- name: Start core
87109
working-directory: supertokens-python
110+
env:
111+
SUPERTOKENS_CORE_VERSION: ${{ steps.core-version.outputs.coreVersion }}
88112
run: docker compose up --wait
89113

90114
- name: Start Server (django)

.github/workflows/backend-sdk-testing.yml

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ jobs:
2424
cdiVersions: ${{ steps.versions.outputs.cdiVersions }}
2525
pyVersions: '["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]'
2626
nodeVersions: '["20"]'
27+
coreCdiVersionMap: ${{ steps.core-versions.outputs.cdiVersions }}
2728
steps:
2829
- uses: actions/checkout@v4
2930

@@ -33,6 +34,13 @@ jobs:
3334
has-fdi: true
3435
has-cdi: true
3536

37+
- uses: supertokens/actions/get-versions-from-repo@main
38+
id: core-versions
39+
with:
40+
repo: supertokens-core
41+
github-token: ${{ secrets.GITHUB_TOKEN }}
42+
cdi-versions: ${{steps.versions.outputs.cdiVersions }}
43+
3644
test:
3745
runs-on: ubuntu-latest
3846
needs: define-versions
@@ -56,14 +64,12 @@ jobs:
5664
# Checking out to a custom path since the test repo will also be cloned
5765
path: supertokens-python
5866

59-
- uses: supertokens/get-versions-action@main
60-
id: versions
61-
with:
62-
driver-name: python
63-
cdi-version: ${{ matrix.cdi-version }}
64-
fdi-version: ${{ matrix.fdi-version }}
65-
env:
66-
SUPERTOKENS_API_KEY: ${{ secrets.SUPERTOKENS_API_KEY }}
67+
- name: Get core version from current CDI version
68+
id: core-version
69+
run: |
70+
coreVersion=$(echo '${{ needs.define-versions.outputs.coreCdiVersionMap }}' | jq -r '.["${{ matrix.cdi-version }}"]')
71+
72+
echo "coreVersion=${coreVersion}" >> $GITHUB_OUTPUT
6773
6874
- uses: actions/setup-node@v4
6975
with:
@@ -82,7 +88,7 @@ jobs:
8288
working-directory: supertokens-python
8389
env:
8490
SUPERTOKENS_ENV: testing
85-
SUPERTOKENS_CORE_VERSION: ${{ steps.versions.outputs.coreVersionXy }}
91+
SUPERTOKENS_CORE_VERSION: ${{ steps.core-version.outputs.coreVersion }}
8692
run: |
8793
source venv/bin/activate
8894
docker compose up --build --wait
@@ -91,6 +97,6 @@ jobs:
9197
- uses: supertokens/backend-sdk-testing-action@main
9298
with:
9399
version: ${{ matrix.fdi-version }}
94-
check-name-suffix: '[CDI=${{ matrix.cdi-version }}][Core=${{ steps.versions.outputs.coreVersionXy }}][FDI=${{ matrix.fdi-version }}][Py=${{ matrix.py-version }}][Node=${{ matrix.node-version }}]'
100+
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 }}]'
95101
path: backend-sdk-testing
96102
app-server-logs: ${{ github.workspace }}/supertokens-python/python.log

.github/workflows/unit-test.yml

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ jobs:
2424
fdiVersions: ${{ steps.versions.outputs.fdiVersions }}
2525
cdiVersions: ${{ steps.versions.outputs.cdiVersions }}
2626
pyVersions: '["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]'
27+
coreCdiVersionMap: ${{ steps.core-versions.outputs.cdiVersions }}
2728

2829
steps:
2930
- uses: actions/checkout@v4
@@ -34,6 +35,13 @@ jobs:
3435
has-fdi: true
3536
has-cdi: true
3637

38+
- uses: supertokens/actions/get-versions-from-repo@main
39+
id: core-versions
40+
with:
41+
repo: supertokens-core
42+
github-token: ${{ secrets.GITHUB_TOKEN }}
43+
cdi-versions: ${{steps.versions.outputs.cdiVersions }}
44+
3745
test:
3846
runs-on: ubuntu-latest
3947
needs: define-versions
@@ -47,13 +55,12 @@ jobs:
4755
steps:
4856
- uses: actions/checkout@v4
4957

50-
- uses: supertokens/get-versions-action@main
51-
id: versions
52-
with:
53-
driver-name: python
54-
cdi-version: ${{ matrix.cdi-version }}
55-
env:
56-
SUPERTOKENS_API_KEY: ${{ secrets.SUPERTOKENS_API_KEY }}
58+
- name: Get core version from current CDI version
59+
id: core-version
60+
run: |
61+
coreVersion=$(echo '${{ needs.define-versions.outputs.coreCdiVersionMap }}' | jq -r '.["${{ matrix.cdi-version }}"]')
62+
63+
echo "coreVersion=${coreVersion}" >> $GITHUB_OUTPUT
5764
5865
- uses: actions/setup-python@v5
5966
with:
@@ -72,12 +79,12 @@ jobs:
7279
source venv/bin/activate
7380
make test
7481
env:
75-
SUPERTOKENS_CORE_VERSION: ${{ steps.versions.outputs.coreVersionXy }}
82+
SUPERTOKENS_CORE_VERSION: ${{ steps.core-version.outputs.coreVersion }}
7683

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

0 commit comments

Comments
 (0)