File tree Expand file tree Collapse file tree 2 files changed +28
-7
lines changed Expand file tree Collapse file tree 2 files changed +28
-7
lines changed Original file line number Diff line number Diff line change 1
1
name : Lint and Test SDK
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
pull_request :
4
- path : ' **/*'
5
-
9
+ branches : [ "*" ]
10
+ workflow_dispatch :
11
+ workflow_call :
12
+ inputs :
13
+ test_data_branch :
14
+ type : string
15
+ description : The branch in sdk-test-data to target for testcase files
16
+ required : false
17
+ default : main
18
+ sdk_branch :
19
+ type : string
20
+ description : The branch of the SDK to test
21
+ required : false
22
+
6
23
jobs :
7
24
lint-test-sdk :
8
25
runs-on : ubuntu-latest
9
26
steps :
10
27
- uses : actions/checkout@v2
28
+ with :
29
+ repository : Eppo-exp/node-server-sdk
30
+ ref : ${{ env.SDK_BRANCH_NAME }}
11
31
- name : Use Node.js
12
32
uses : actions/setup-node@v1
13
33
with :
@@ -19,21 +39,22 @@ jobs:
19
39
- name : Install root dependencies
20
40
run : yarn --frozen-lockfile
21
41
working-directory : ./
22
- - name : ' Set up GCP SDK for downloading test data'
23
- uses : ' google-github-actions/setup-gcloud@v0'
24
42
- name : Install sdk dependencies
25
43
run : yarn --frozen-lockfile
26
44
working-directory : ./
27
45
- name : Check code with eslint
28
46
run : npx eslint '**/*.{ts,tsx}'
29
47
working-directory : ./
30
- - name : Run unit tests
31
- run : yarn test:unit
48
+ - name : Run unit and e2e tests
49
+ run : make test branchName=${{ env.TEST_DATA_BRANCH_NAME }}
32
50
working-directory : ./
33
51
typecheck :
34
52
runs-on : ubuntu-latest
35
53
steps :
36
54
- uses : actions/checkout@v2
55
+ with :
56
+ repository : Eppo-exp/node-server-sdk
57
+ ref : ${{ env.SDK_BRANCH_NAME }}
37
58
- name : Use Node.js
38
59
uses : actions/setup-node@v1
39
60
with :
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ test-data:
39
39
40
40
# # test
41
41
.PHONY : test
42
- test : test
42
+ test : test test-data
43
43
yarn test:unit
44
44
45
45
# # prepare
You can’t perform that action at this time.
0 commit comments