Skip to content

Commit d0e0bb4

Browse files
Modify the workflow to run in a separate workflow for test
1 parent 3c77a8c commit d0e0bb4

File tree

2 files changed

+95
-34
lines changed

2 files changed

+95
-34
lines changed

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

Lines changed: 13 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Auth-React Tests
1+
name: Auth-React Tests - L1
22

33
on:
44
pull_request:
@@ -10,7 +10,7 @@ on:
1010
branches:
1111
- master
1212
- "v[0-9]+.[0-9]+"
13-
- "ci/github-actions/auth-react/v0.48.0" # TODO: Remove this
13+
- "ci/github-actions/auth-react/v0.49.0" # TODO: Remove this
1414
tags:
1515
- "(dev-)?v[0-9]+.[0-9]+.[0-9]+"
1616

@@ -33,7 +33,7 @@ jobs:
3333
fail-fast: true
3434
matrix:
3535
# fdi-version: ${{ fromJSON(needs.define-versions.outputs.fdiVersions) }}
36-
fdi-version: ["4.0"]
36+
fdi-version: ["4.1", "3.1"]
3737

3838
outputs:
3939
AUTH_REACT__LOG_DIR: ${{ steps.envs.outputs.AUTH_REACT__LOG_DIR }}
@@ -62,43 +62,22 @@ jobs:
6262
fdi-version: ${{ matrix.fdi-version }}
6363
use-common-app-and-test-server: "true"
6464

65-
test:
66-
runs-on: ubuntu-latest
65+
launch-test-workflow:
66+
uses: ./.github/workflows/auth-react-test-2.yml
6767
needs: setup-auth-react
68-
68+
name: FDI ${{ matrix.fdi-version }}
6969
strategy:
70-
max-parallel: 10
71-
fail-fast: false
70+
max-parallel: 1 # This is important to avoid ddos GHA API
71+
fail-fast: false # Don't fail fast to avoid locking TF State
7272
matrix:
7373
# fdi-version: ${{ fromJSON(needs.define-versions.outputs.fdiVersions) }}
74-
fdi-version: ["4.0"]
75-
spec: ${{ fromJSON(needs.setup-auth-react.outputs.specs) }}
76-
77-
env:
78-
SUPERTOKENS_CORE_PORT: 3567
79-
SUPERTOKENS_CORE_HOST: localhost
80-
TEST_MODE: testing
81-
# Auth react setup envs
74+
fdi-version: ["4.1", "3.1"]
75+
with:
76+
fdi-version: ${{ matrix.fdi-version }}
77+
specs: ${{ needs.setup-auth-react.outputs.specs }}
8278
AUTH_REACT__LOG_DIR: ${{ needs.setup-auth-react.outputs.AUTH_REACT__LOG_DIR }}
8379
AUTH_REACT__SCREENSHOT_DIR: ${{ needs.setup-auth-react.outputs.AUTH_REACT__SCREENSHOT_DIR }}
80+
AUTH_REACT__APP_SERVER: ${{ needs.setup-auth-react.outputs.AUTH_REACT__APP_SERVER }}
8481
AUTH_REACT__NODE_PORT: ${{ needs.setup-auth-react.outputs.AUTH_REACT__NODE_PORT }}
85-
AUTH_REACT__APP_SERVER: ${{ needs.setup-auth-react.outputs.AUTH_REACT__NODE_PORT }}
8682
AUTH_REACT__TEST_MODE: ${{ needs.setup-auth-react.outputs.AUTH_REACT__TEST_MODE }}
8783
AUTH_REACT__PORT: ${{ needs.setup-auth-react.outputs.AUTH_REACT__PORT }}
88-
89-
steps:
90-
- uses: actions/checkout@v4
91-
with:
92-
path: supertokens-auth-react
93-
94-
- name: Start core
95-
run: docker compose up --wait
96-
working-directory: supertokens-auth-react
97-
98-
- uses: supertokens/auth-react-testing-action@main
99-
name: test ${{ matrix.spec }} for ${{ matrix.fdi-version }}
100-
with:
101-
fdi-version: ${{ matrix.fdi-version }}
102-
check-name-suffix: "[FDI=${{ matrix.fdi-version }}][Spec=${{ matrix.spec }}]"
103-
path: supertokens-auth-react
104-
spec: ${{ matrix.spec }}
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
name: Auth-React Tests - L2
2+
on:
3+
workflow_call:
4+
inputs:
5+
fdi-version:
6+
description: "FDI Version"
7+
required: true
8+
type: string
9+
10+
specs:
11+
description: "Spec Files"
12+
required: true
13+
type: string
14+
15+
AUTH_REACT__LOG_DIR:
16+
description: AUTH_REACT__LOG_DIR
17+
required: true
18+
type: string
19+
20+
AUTH_REACT__SCREENSHOT_DIR:
21+
description: AUTH_REACT__SCREENSHOT_DIR
22+
required: true
23+
type: string
24+
25+
AUTH_REACT__APP_SERVER:
26+
description: AUTH_REACT__APP_SERVER
27+
required: true
28+
type: string
29+
30+
AUTH_REACT__NODE_PORT:
31+
description: AUTH_REACT__NODE_PORT
32+
required: true
33+
type: string
34+
35+
AUTH_REACT__TEST_MODE:
36+
description: AUTH_REACT__TEST_MODE
37+
required: true
38+
type: string
39+
40+
AUTH_REACT__PORT:
41+
description: AUTH_REACT__PORT
42+
required: true
43+
type: string
44+
45+
jobs:
46+
test:
47+
runs-on: ubuntu-latest
48+
49+
strategy:
50+
max-parallel: 10
51+
fail-fast: false
52+
matrix:
53+
spec: ${{ fromJSON(inputs.specs) }}
54+
55+
env:
56+
SUPERTOKENS_CORE_PORT: 3567
57+
SUPERTOKENS_CORE_HOST: localhost
58+
TEST_MODE: testing
59+
# Auth react setup envs
60+
AUTH_REACT__LOG_DIR: ${{ inputs.AUTH_REACT__LOG_DIR }}
61+
AUTH_REACT__SCREENSHOT_DIR: ${{ inputs.AUTH_REACT__SCREENSHOT_DIR }}
62+
AUTH_REACT__NODE_PORT: ${{ inputs.AUTH_REACT__NODE_PORT }}
63+
AUTH_REACT__APP_SERVER: ${{ inputs.AUTH_REACT__NODE_PORT }}
64+
AUTH_REACT__TEST_MODE: ${{ inputs.AUTH_REACT__TEST_MODE }}
65+
AUTH_REACT__PORT: ${{ inputs.AUTH_REACT__PORT }}
66+
67+
steps:
68+
- uses: actions/checkout@v4
69+
with:
70+
path: supertokens-auth-react
71+
72+
- name: Start core
73+
run: docker compose up --wait
74+
working-directory: supertokens-auth-react
75+
76+
- uses: supertokens/auth-react-testing-action@main
77+
name: test ${{ matrix.spec }} for ${{ inputs.fdi-version }}
78+
with:
79+
fdi-version: ${{ inputs.fdi-version }}
80+
check-name-suffix: "[FDI=${{ inputs.fdi-version }}][Spec=${{ matrix.spec }}]"
81+
path: supertokens-auth-react
82+
spec: ${{ matrix.spec }}

0 commit comments

Comments
 (0)