This repository was archived by the owner on Sep 11, 2024. It is now read-only.
File tree 3 files changed +17
-0
lines changed
3 files changed +17
-0
lines changed Original file line number Diff line number Diff line change 5
5
branches : [develop, master]
6
6
repository_dispatch :
7
7
types : [upstream-sdk-notify]
8
+ workflow_call :
9
+ inputs :
10
+ matrix-js-sdk-sha :
11
+ type : string
12
+ required : false
13
+ description : " The matrix-js-sdk SHA to use"
8
14
env :
9
15
# These must be set for fetchdep.sh to get the right branch
10
16
REPOSITORY : ${{ github.repository }}
16
22
steps :
17
23
- name : Checkout code
18
24
uses : actions/checkout@v3
25
+ with :
26
+ repository : ${{ inputs.matrix-js-sdk-sha && 'matrix-org/matrix-react-sdk' || github.repository }}
19
27
20
28
- name : Yarn cache
21
29
uses : actions/setup-node@v3
24
32
25
33
- name : Install Deps
26
34
run : " ./scripts/ci/install-deps.sh --ignore-scripts"
35
+ env :
36
+ JS_SDK_GITHUB_BASE_REF : ${{ inputs.matrix-js-sdk-sha }}
27
37
28
38
- name : Get number of CPU cores
29
39
id : cpu-cores
38
48
run : " yarn coverage --ci --reporters github-actions --max-workers ${{ steps.cpu-cores.outputs.count }}"
39
49
40
50
- name : Upload Artifact
51
+ if : inputs.matrix-js-sdk-sha == ''
41
52
uses : actions/upload-artifact@v3
42
53
with :
43
54
name : coverage
@@ -50,10 +61,14 @@ jobs:
50
61
runs-on : ubuntu-latest
51
62
steps :
52
63
- uses : actions/checkout@v3
64
+ with :
65
+ repository : ${{ inputs.matrix-js-sdk-sha && 'matrix-org/matrix-react-sdk' || github.repository }}
53
66
54
67
- uses : actions/setup-node@v3
55
68
with :
56
69
cache : " yarn"
57
70
58
71
- name : Run tests
59
72
run : " ./scripts/ci/app-tests.sh"
73
+ env :
74
+ JS_SDK_GITHUB_BASE_REF : ${{ inputs.matrix-js-sdk-sha }}
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ set -ex
11
11
12
12
scripts/fetchdep.sh matrix-org matrix-js-sdk
13
13
pushd matrix-js-sdk
14
+ [ -n " $JS_SDK_GITHUB_BASE_REF " ] && git fetch --depth 1 origin $JS_SDK_GITHUB_BASE_REF && git checkout $JS_SDK_GITHUB_BASE_REF
14
15
yarn link
15
16
yarn install --pure-lockfile $@
16
17
popd
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ set -ex
16
16
# Set up the js-sdk first
17
17
scripts/fetchdep.sh matrix-org matrix-js-sdk
18
18
pushd matrix-js-sdk
19
+ [ -n " $JS_SDK_GITHUB_BASE_REF " ] && git fetch --depth 1 origin $JS_SDK_GITHUB_BASE_REF && git checkout $JS_SDK_GITHUB_BASE_REF
19
20
yarn link
20
21
yarn install --pure-lockfile
21
22
popd
You can’t perform that action at this time.
0 commit comments