Skip to content

Commit 0c55710

Browse files
Add init workflow for auth-react e2e tests
1 parent daaf860 commit 0c55710

File tree

1 file changed

+94
-0
lines changed

1 file changed

+94
-0
lines changed
Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
name: Auth-React Tests - L1
2+
3+
on:
4+
pull_request:
5+
types:
6+
- opened
7+
- reopened
8+
- synchronize
9+
push:
10+
branches:
11+
- master
12+
- "v[0-9]+.[0-9]+"
13+
tags:
14+
- "(dev-)?v[0-9]+.[0-9]+.[0-9]+"
15+
16+
jobs:
17+
define-versions:
18+
runs-on: ubuntu-latest
19+
outputs:
20+
fdiVersions: ${{ steps.versions.outputs.fdiVersions }}
21+
cdiVersions: ${{ steps.versions.outputs.cdiVersions }}
22+
steps:
23+
- uses: actions/checkout@v4
24+
- uses: supertokens/get-supported-versions-action@main
25+
id: versions
26+
with:
27+
has-fdi: true
28+
has-cdi: true
29+
30+
setup-auth-react:
31+
runs-on: ubuntu-latest
32+
needs: define-versions
33+
strategy:
34+
fail-fast: true
35+
matrix:
36+
# fdi-version: ${{ fromJSON(needs.define-versions.outputs.fdiVersions) }}
37+
fdi-version: ["4.1"]
38+
39+
outputs:
40+
AUTH_REACT__LOG_DIR: ${{ steps.envs.outputs.AUTH_REACT__LOG_DIR }}
41+
AUTH_REACT__SCREENSHOT_DIR: ${{ steps.envs.outputs.AUTH_REACT__SCREENSHOT_DIR }}
42+
AUTH_REACT__NODE_PORT: ${{ steps.envs.outputs.AUTH_REACT__NODE_PORT }}
43+
AUTH_REACT__TEST_MODE: ${{ steps.envs.outputs.AUTH_REACT__TEST_MODE }}
44+
AUTH_REACT__PORT: ${{ steps.envs.outputs.AUTH_REACT__PORT }}
45+
specs: ${{ steps.envs.outputs.specs }}
46+
47+
steps:
48+
- uses: supertokens/get-versions-action@main
49+
id: versions
50+
with:
51+
driver-name: node
52+
fdi-version: ${{ matrix.fdi-version }}
53+
env:
54+
SUPERTOKENS_API_KEY: ${{ secrets.SUPERTOKENS_API_KEY }}
55+
56+
- uses: supertokens/auth-react-testing-action/setup@main
57+
id: envs
58+
with:
59+
# auth-react-version: ${{ steps.versions.outputs.authReactTag }}
60+
auth-react-version: ci/github-actions/auth-react/v0.49.0
61+
node-sdk-version: ${{ steps.versions.outputs.nodeTag }}
62+
fdi-version: ${{ matrix.fdi-version }}
63+
use-common-app-and-test-server: "true"
64+
65+
test:
66+
runs-on: ubuntu-latest
67+
needs: setup-auth-react
68+
69+
strategy:
70+
max-parallel: 2
71+
fail-fast: false
72+
matrix:
73+
# fdi-version: ${{ fromJSON(needs.define-versions.outputs.fdiVersions) }}
74+
fdi-version: ["4.1"]
75+
76+
env:
77+
SUPERTOKENS_CORE_PORT: 3567
78+
SUPERTOKENS_CORE_HOST: localhost
79+
TEST_MODE: testing
80+
# Auth react setup envs
81+
AUTH_REACT__LOG_DIR: ${{ needs.setup-auth-react.outputs.AUTH_REACT__LOG_DIR }}
82+
AUTH_REACT__SCREENSHOT_DIR: ${{ needs.setup-auth-react.outputs.AUTH_REACT__SCREENSHOT_DIR }}
83+
AUTH_REACT__NODE_PORT: ${{ needs.setup-auth-react.outputs.AUTH_REACT__NODE_PORT }}
84+
AUTH_REACT__TEST_MODE: ${{ needs.setup-auth-react.outputs.AUTH_REACT__TEST_MODE }}
85+
AUTH_REACT__PORT: ${{ needs.setup-auth-react.outputs.AUTH_REACT__PORT }}
86+
87+
steps:
88+
- uses: supertokens/auth-react-testing-action@main
89+
name: ${{ matrix.fdi-version }}
90+
with:
91+
fdi-version: ${{ matrix.fdi-version }}
92+
check-name-suffix: "[FDI=${{ matrix.fdi-version }}][Spec=${{ needs.setup-auth-react.outputs.specs }}]"
93+
path: supertokens-auth-react
94+
spec: ${{ needs.setup-auth-react.outputs.specs }}

0 commit comments

Comments
 (0)