4
4
paths :
5
5
- ' **/*'
6
6
7
+ workflow_dispatch :
8
+
9
+ workflow_call :
10
+ inputs :
11
+ test_data_branch :
12
+ type : string
13
+ description : The branch in sdk-test-data to target for testcase files
14
+ required : false
15
+ default : main
16
+ sdk_branch :
17
+ type : string
18
+ description : The branch of the SDK to test
19
+ required : false
20
+
21
+ env :
22
+ SDK_BRANCH_NAME : ${{ inputs.sdk_branch || github.head_ref || github.ref_name || 'main' }}
23
+ TEST_DATA_BRANCH_NAME : ${{ inputs.test_data_branch || 'main' }}
24
+
7
25
jobs :
8
26
lint-test-sdk :
9
27
runs-on : ubuntu-latest
10
28
steps :
29
+ - name : Display Testing Details
30
+ run : |
31
+ echo "Running SDK Test using"
32
+ echo "Test Data: sdk-test-data@${TEST_DATA_BRANCH_NAME}"
33
+ echo "SDK Branch: js-client-sdk@${SDK_BRANCH_NAME}"
11
34
- uses : actions/checkout@v2
35
+ with :
36
+ repository : Eppo-exp/js-client-sdk
37
+ ref : ${{ env.SDK_BRANCH_NAME }}
12
38
- name : Use Node.js
13
39
uses : actions/setup-node@v1
14
40
with :
@@ -17,21 +43,22 @@ jobs:
17
43
with :
18
44
path : ' ./node_modules'
19
45
key : ${{ runner.os }}-root-node-modules-${{ hashFiles('./yarn.lock') }}
20
- - name : ' Set up GCP SDK for downloading test data'
21
- uses : ' google-github-actions/setup-gcloud@v0'
22
46
- name : Install SDK dependencies
23
47
run : yarn --frozen-lockfile
24
48
working-directory : ./
25
49
- name : Check code with eslint
26
50
run : npx eslint '**/*.{ts,tsx}'
27
51
working-directory : ./
28
52
- name : Run tests
29
- run : yarn test
53
+ run : make test branchName=${{ env.TEST_DATA_BRANCH_NAME }}
30
54
working-directory : ./
31
55
typecheck :
32
56
runs-on : ubuntu-latest
33
57
steps :
34
58
- uses : actions/checkout@v2
59
+ with :
60
+ repository : Eppo-exp/js-client-sdk
61
+ ref : ${{ env.SDK_BRANCH_NAME }}
35
62
- name : Use Node.js
36
63
uses : actions/setup-node@v1
37
64
with :
0 commit comments