Skip to content

Commit 359532a

Browse files
authored
Merge branch '23.1' into feat/plugin/base
2 parents f68e966 + 0fe0ab5 commit 359532a

File tree

4 files changed

+83
-25
lines changed

4 files changed

+83
-25
lines changed

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

Lines changed: 25 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ jobs:
2626
fdiVersions: ${{ steps.versions.outputs.fdiVersions }}
2727
cdiVersions: ${{ steps.versions.outputs.cdiVersions }}
2828
nodeVersions: '["20"]'
29+
nodeFdiVersionMap: ${{ steps.node-versions.outputs.fdiVersions }}
30+
authReactFdiVersionMap: ${{ steps.auth-react-versions.outputs.fdiVersions }}
2931
steps:
3032
- uses: actions/checkout@v4
3133
- uses: supertokens/get-supported-versions-action@main
@@ -34,6 +36,20 @@ jobs:
3436
has-fdi: true
3537
has-cdi: true
3638

39+
- uses: supertokens/actions/get-versions-from-repo@main
40+
id: auth-react-versions
41+
with:
42+
repo: supertokens-auth-react
43+
github-token: ${{ secrets.GITHUB_TOKEN }}
44+
fdi-versions: ${{ steps.versions.outputs.fdiVersions }}
45+
46+
- uses: supertokens/actions/get-versions-from-repo@main
47+
id: node-versions
48+
with:
49+
repo: supertokens-node
50+
github-token: ${{ secrets.GITHUB_TOKEN }}
51+
fdi-versions: ${{ steps.versions.outputs.fdiVersions }}
52+
3753
setup-auth-react:
3854
if: github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'run-tests')
3955
runs-on: ubuntu-latest
@@ -54,19 +70,20 @@ jobs:
5470
matrix: ${{ steps.setup-matrix.outputs.matrix }}
5571

5672
steps:
57-
- uses: supertokens/get-versions-action@main
73+
- name: Get node and auth-react versions for FDI
5874
id: versions
59-
with:
60-
driver-name: node
61-
fdi-version: ${{ matrix.fdi-version }}
62-
env:
63-
SUPERTOKENS_API_KEY: ${{ secrets.SUPERTOKENS_API_KEY }}
75+
run: |
76+
nodeVersion=$( echo '${{ needs.define-versions.outputs.nodeFdiVersionMap }}' | jq -r '.["${{ matrix.fdi-version }}"]' )
77+
authReactVersion=$( echo '${{ needs.define-versions.outputs.authReactFdiVersionMap }}' | jq -r '.["${{ matrix.fdi-version }}"]' )
78+
79+
echo "nodeVersion=${nodeVersion}" >> $GITHUB_OUTPUT
80+
echo "authReactVersion=${authReactVersion}" >> $GITHUB_OUTPUT
6481
6582
- uses: supertokens/auth-react-testing-action/setup@main
6683
id: envs
6784
with:
68-
auth-react-version: ${{ steps.versions.outputs.authReactVersionXy }}
69-
node-sdk-version: ${{ steps.versions.outputs.nodeTag }}
85+
auth-react-version: ${{ steps.versions.outputs.authReactVersion }}
86+
node-sdk-version: ${{ steps.versions.outputs.nodeVersion }}
7087
fdi-version: ${{ matrix.fdi-version }}
7188

7289
- id: setup-matrix

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

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ jobs:
2626
fdiVersions: ${{ steps.versions.outputs.fdiVersions }}
2727
cdiVersions: ${{ steps.versions.outputs.cdiVersions }}
2828
nodeVersions: '["20"]'
29+
coreCdiVersionMap: ${{ steps.core-versions.outputs.cdiVersions }}
2930
steps:
3031
- uses: actions/checkout@v4
3132
- uses: supertokens/get-supported-versions-action@main
@@ -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
if: github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'run-tests')
3947
runs-on: ubuntu-latest
@@ -57,14 +65,12 @@ jobs:
5765
# Checking out to a custom path since the test repo will also be cloned
5866
path: supertokens-node
5967

60-
- uses: supertokens/get-versions-action@main
61-
id: versions
62-
with:
63-
driver-name: node
64-
cdi-version: ${{ matrix.cdi-version }}
65-
fdi-version: ${{ matrix.fdi-version }}
66-
env:
67-
SUPERTOKENS_API_KEY: ${{ secrets.SUPERTOKENS_API_KEY }}
68+
- name: Get core version from current CDI version
69+
id: core-version
70+
run: |
71+
coreVersion=$(echo '${{ needs.define-versions.outputs.coreCdiVersionMap }}' | jq -r '.["${{ matrix.cdi-version }}"]')
72+
73+
echo "coreVersion=${coreVersion}" >> $GITHUB_OUTPUT
6874
6975
- uses: actions/setup-node@v4
7076
with:
@@ -74,7 +80,7 @@ jobs:
7480
working-directory: supertokens-node
7581
run: docker compose up --build --wait
7682
env:
77-
SUPERTOKENS_CORE_VERSION: ${{ steps.versions.outputs.coreVersionXy }}
83+
SUPERTOKENS_CORE_VERSION: ${{ steps.core-version.outputs.coreVersion }}
7884

7985
- name: Install SDK dependencies
8086
working-directory: supertokens-node

.github/workflows/website-test.yml

Lines changed: 38 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ jobs:
2626
fdiVersions: ${{ steps.versions.outputs.fdiVersions }}
2727
cdiVersions: ${{ steps.versions.outputs.cdiVersions }}
2828
nodeVersions: '["20"]'
29+
nodeFdiVersionMap: ${{ steps.node-versions.outputs.fdiVersions }}
30+
websiteFdiVersionMap: ${{ steps.website-versions.outputs.fdiVersions }}
31+
coreCdiVersionMap: ${{ steps.core-versions.outputs.cdiVersions }}
2932
steps:
3033
- uses: actions/checkout@v4
3134
- uses: supertokens/get-supported-versions-action@main
@@ -34,6 +37,27 @@ jobs:
3437
has-fdi: true
3538
has-cdi: true
3639

40+
- uses: supertokens/actions/get-versions-from-repo@main
41+
id: website-versions
42+
with:
43+
repo: supertokens-website
44+
github-token: ${{ secrets.GITHUB_TOKEN }}
45+
fdi-versions: ${{ steps.versions.outputs.fdiVersions }}
46+
47+
- uses: supertokens/actions/get-versions-from-repo@main
48+
id: node-versions
49+
with:
50+
repo: supertokens-node
51+
github-token: ${{ secrets.GITHUB_TOKEN }}
52+
fdi-versions: ${{ steps.versions.outputs.fdiVersions }}
53+
54+
- uses: supertokens/actions/get-versions-from-repo@main
55+
id: core-versions
56+
with:
57+
repo: supertokens-core
58+
github-token: ${{ secrets.GITHUB_TOKEN }}
59+
cdi-versions: ${{steps.versions.outputs.cdiVersions }}
60+
3761
test:
3862
if: github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'run-tests')
3963
runs-on: ubuntu-latest
@@ -61,16 +85,22 @@ jobs:
6185
with:
6286
node-version: ${{ matrix.node-version }}
6387

64-
- uses: supertokens/get-versions-action@main
88+
- name: Get versions from current FDI/CDI version
6589
id: versions
66-
with:
67-
driver-name: python
68-
fdi-version: ${{ matrix.fdi-version }}
69-
env:
70-
SUPERTOKENS_API_KEY: ${{ secrets.SUPERTOKENS_API_KEY }}
90+
run: |
91+
latestCdiVersion=$(echo '${{ needs.define-versions.outputs.cdiVersions }}' | jq -r '.[-1]' | sed -e 's/"/\\"/g')
92+
coreVersion=$(echo '${{ needs.define-versions.outputs.coreCdiVersionMap }}' | jq -r ".[\"$latestCdiVersion\"]")
93+
nodeVersion=$(echo '${{ needs.define-versions.outputs.nodeFdiVersionMap }}' | jq -r '.["${{ matrix.fdi-version }}"]')
94+
websiteVersion=$(echo '${{ needs.define-versions.outputs.websiteFdiVersionMap }}' | jq -r '.["${{ matrix.fdi-version }}"]')
95+
96+
echo "coreVersion=${coreVersion}" >> $GITHUB_OUTPUT
97+
echo "nodeVersion=${nodeVersion}" >> $GITHUB_OUTPUT
98+
echo "websiteVersion=${websiteVersion}" >> $GITHUB_OUTPUT
7199
72100
- name: Start core
73101
working-directory: supertokens-node
102+
env:
103+
SUPERTOKENS_CORE_VERSION: ${{ steps.versions.outputs.coreVersion }}
74104
run: docker compose up --wait
75105

76106
- name: Install SDK dependencies
@@ -89,8 +119,8 @@ jobs:
89119
90120
- uses: supertokens/website-testing-action@main
91121
with:
92-
version: ${{ steps.versions.outputs.frontendVersionXy }}
93-
node-sdk-version: ${{ steps.versions.outputs.nodeTag }}
122+
version: ${{ steps.versions.outputs.websiteVersion }}
123+
node-sdk-version: ${{ steps.versions.outputs.nodeVersion }}
94124
path: supertokens-website
95125
check-name-suffix: "[Node=${{ matrix.node-version }}][FDI=${{ matrix.fdi-version }}]"
96126
app-server-logs: ${{ steps.envs.outputs.APP_SERVER_LOG_DIR }}

compose.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@ services:
22
core:
33
# Uses `$SUPERTOKENS_CORE_VERSION` when available, else latest
44
image: supertokens/supertokens-dev-postgresql:${SUPERTOKENS_CORE_VERSION:-master}
5+
entrypoint: [
6+
"/usr/lib/supertokens/jre/bin/java",
7+
"-classpath", "/usr/lib/supertokens/core/*:/usr/lib/supertokens/plugin-interface/*:/usr/lib/supertokens/ee/*",
8+
"io.supertokens.Main", "/usr/lib/supertokens/", "DEV", "test_mode"
9+
]
510
ports:
611
# Uses `$SUPERTOKENS_CORE_PORT` when available, else 3567 for local port
712
- ${SUPERTOKENS_CORE_PORT:-3567}:3567

0 commit comments

Comments
 (0)