File tree Expand file tree Collapse file tree 2 files changed +39
-1
lines changed Expand file tree Collapse file tree 2 files changed +39
-1
lines changed Original file line number Diff line number Diff line change 1
1
name : CI
2
+
3
+ env :
4
+ SDK_BRANCH_NAME : ${{ inputs.sdk_branch || github.head_ref || github.ref_name || 'main' }}
5
+ TEST_DATA_BRANCH_NAME : ${{ inputs.test_data_branch || 'main' }}
6
+
2
7
on :
3
8
push :
4
9
branches :
5
10
- main
6
11
pull_request :
7
12
branches :
8
13
- main
14
+ workflow_dispatch :
9
15
16
+ workflow_call :
17
+ inputs :
18
+ test_data_branch :
19
+ type : string
20
+ description : The branch in sdk-test-data to target for testcase files
21
+ required : false
22
+ default : main
23
+ sdk_branch :
24
+ type : string
25
+ description : The branch of the SDK to test
26
+ required : false
27
+
10
28
jobs :
11
29
lint :
12
30
runs-on : ubuntu-latest
13
31
steps :
14
32
- name : Checkout
15
33
uses : actions/checkout@v3
34
+ with :
35
+ repository : Eppo-exp/react-native-sdk
36
+ ref : ${{ env.SDK_BRANCH_NAME}}
16
37
17
38
- name : Setup Node.js
18
39
uses : actions/setup-node@v3
30
51
31
52
test :
32
53
runs-on : ubuntu-latest
54
+
33
55
steps :
56
+ - name : Display Testing Details
57
+ run : |
58
+ echo "Running SDK Test using"
59
+ echo "Test Data: sdk-test-data@${TEST_DATA_BRANCH_NAME}"
60
+ echo "SDK Branch: php-sdk@${SDK_BRANCH_NAME}"
61
+
34
62
- name : Checkout
35
63
uses : actions/checkout@v3
64
+ with :
65
+ repository : Eppo-exp/react-native-sdk
66
+ ref : ${{ env.SDK_BRANCH_NAME}}
36
67
37
68
- name : Setup Node.js
38
69
uses : actions/setup-node@v3
@@ -46,13 +77,16 @@ jobs:
46
77
run : yarn install
47
78
48
79
- name : Run unit tests
49
- run : yarn test --maxWorkers=2 --coverage
80
+ run : make test branchName=${{env.TEST_DATA_BRANCH_NAME}}
50
81
51
82
build :
52
83
runs-on : ubuntu-latest
53
84
steps :
54
85
- name : Checkout
55
86
uses : actions/checkout@v3
87
+ with :
88
+ repository : Eppo-exp/react-native-sdk
89
+ ref : ${{ env.SDK_BRANCH_NAME}}
56
90
57
91
- name : Setup Node.js
58
92
uses : actions/setup-node@v3
Original file line number Diff line number Diff line change @@ -37,3 +37,7 @@ test-data:
37
37
cp ${gitDataDir} rac-experiments-v3.json ${testDataDir}
38
38
cp -r ${gitDataDir} assignment-v2 ${testDataDir}
39
39
rm -rf ${tempDir}
40
+
41
+ .PHONY : test
42
+ test : test-data
43
+ yarn test --maxWorkers=2 --coverage
You can’t perform that action at this time.
0 commit comments