|
26 | 26 | fdiVersions: ${{ steps.versions.outputs.fdiVersions }} |
27 | 27 | cdiVersions: ${{ steps.versions.outputs.cdiVersions }} |
28 | 28 | nodeVersions: '["20"]' |
| 29 | + nodeFdiVersionMap: ${{ steps.node-versions.outputs.fdiVersions }} |
| 30 | + websiteFdiVersionMap: ${{ steps.website-versions.outputs.fdiVersions }} |
| 31 | + coreCdiVersionMap: ${{ steps.core-versions.outputs.cdiVersions }} |
29 | 32 | steps: |
30 | 33 | - uses: actions/checkout@v4 |
31 | 34 | - uses: supertokens/get-supported-versions-action@main |
|
34 | 37 | has-fdi: true |
35 | 38 | has-cdi: true |
36 | 39 |
|
| 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 | + |
37 | 61 | test: |
38 | 62 | if: github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'run-tests') |
39 | 63 | runs-on: ubuntu-latest |
@@ -61,16 +85,22 @@ jobs: |
61 | 85 | with: |
62 | 86 | node-version: ${{ matrix.node-version }} |
63 | 87 |
|
64 | | - - uses: supertokens/get-versions-action@main |
| 88 | + - name: Get versions from current FDI/CDI version |
65 | 89 | 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 |
71 | 99 |
|
72 | 100 | - name: Start core |
73 | 101 | working-directory: supertokens-node |
| 102 | + env: |
| 103 | + SUPERTOKENS_CORE_VERSION: ${{ steps.versions.outputs.coreVersion }} |
74 | 104 | run: docker compose up --wait |
75 | 105 |
|
76 | 106 | - name: Install SDK dependencies |
|
89 | 119 |
|
90 | 120 | - uses: supertokens/website-testing-action@main |
91 | 121 | 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 }} |
94 | 124 | path: supertokens-website |
95 | 125 | check-name-suffix: "[Node=${{ matrix.node-version }}][FDI=${{ matrix.fdi-version }}]" |
96 | 126 | app-server-logs: ${{ steps.envs.outputs.APP_SERVER_LOG_DIR }} |
0 commit comments