1
- name : CI
1
+ name : default-storage
2
2
on :
3
3
push :
4
4
branches :
5
5
- main
6
6
pull_request :
7
7
jobs :
8
- format :
9
- name : Format
8
+ changes :
9
+ name : report changed files
10
10
runs-on : ubuntu-latest
11
+ outputs :
12
+ changed : ${{ steps.filter.outputs.storage }}
11
13
steps :
12
- - name : Checkout
13
- uses : actions/checkout@v3
14
- - name : Set up Node.js
15
- uses : actions/setup-node@v3.6.0
16
- with :
17
- node-version : 18.16.1
18
- cache : yarn
19
- - name : Install JS dependencies
20
- run : yarn
21
- - name : Format
22
- run : |
23
- yarn format
24
- git diff --exit-code
25
- review :
26
- name : Review
27
- runs-on : ubuntu-latest
28
- strategy :
29
- matrix :
30
- test-name : [lint, ts]
31
- workspace : [default-storage, api]
32
- steps :
33
- - name : Checkout
34
- uses : actions/checkout@v3
35
- - name : Set up Node.js
36
- uses : actions/setup-node@v3.6.0
14
+ - uses : actions/checkout@4
15
+ - uses : dorny/paths-filter@v3
16
+ id : filter
37
17
with :
38
- node-version : 18.16.1
39
- cache : yarn
40
- - name : Install JS dependencies
41
- run : yarn
42
- - name : Run test ${{ matrix.test-name }}
43
- run : yarn test:${{ matrix.test-name }}
44
- working-directory : packages/${{ matrix.workspace }}
18
+ token : ${{ secrets.GH_RELEASE_TOKEN }}
19
+ filters : |
20
+ storage:
21
+ - 'packages/default-storage'
22
+
45
23
android :
46
24
name : Android
25
+ needs : changes
26
+ if : ${{ needs.changes.outputs.changed == 'true' }}
47
27
runs-on : ubuntu-22.04
48
28
steps :
49
29
- name : Checkout
50
- uses : actions/checkout@v3
51
- - name : Set up Node.js
52
- uses : actions/setup-node@v3.6.0
53
- with :
54
- node-version : 18.16.1
55
- cache : yarn
30
+ uses : actions/checkout@v4
31
+ - name : Setup project
32
+ uses : ./.github/actions/setup-project
56
33
- name : Install JS dependencies
57
34
run : |
58
35
yarn
@@ -69,21 +46,20 @@ jobs:
69
46
70
47
ios :
71
48
name : iOS
49
+ needs : changes
50
+ if : ${{ needs.changes.outputs.changed == 'true' }}
72
51
runs-on : macos-latest
73
52
steps :
74
53
- name : Checkout
75
- uses : actions/checkout@v3
54
+ uses : actions/checkout@v4
55
+ - name : Setup project
56
+ uses : ./.github/actions/setup-project
76
57
- name : Cache /.ccache
77
58
uses : actions/cache@v3
78
59
with :
79
60
path : packages/default-storage/.ccache
80
61
key : ccache-ios-${{ hashFiles('yarn.lock') }}
81
62
restore-keys : ccache-ios-
82
- - name : Set up Node.js
83
- uses : actions/setup-node@v3.6.0
84
- with :
85
- node-version : 18.16.1
86
- cache : yarn
87
63
- name : Install JS dependencies
88
64
run : |
89
65
yarn
@@ -102,21 +78,20 @@ jobs:
102
78
103
79
macos :
104
80
name : macOS
81
+ needs : changes
82
+ if : ${{ needs.changes.outputs.changed == 'true' }}
105
83
runs-on : macos-latest
106
84
steps :
107
85
- name : Checkout
108
- uses : actions/checkout@v3
86
+ uses : actions/checkout@v4
87
+ - name : Setup project
88
+ uses : ./.github/actions/setup-project
109
89
- name : Cache /.ccache
110
90
uses : actions/cache@v3
111
91
with :
112
92
path : packages/default-storage/.ccache
113
93
key : ccache-macos-${{ hashFiles('yarn.lock') }}
114
94
restore-keys : ccache-macos-
115
- - name : Set up Node.js
116
- uses : actions/setup-node@v3.6.0
117
- with :
118
- node-version : 18.16.1
119
- cache : yarn
120
95
- name : Install JS dependencies
121
96
run : |
122
97
yarn
@@ -140,19 +115,18 @@ jobs:
140
115
141
116
windows :
142
117
name : Windows
118
+ needs : changes
119
+ if : ${{ needs.changes.outputs.changed == 'true' }}
143
120
runs-on : windows-2022
144
121
steps :
145
122
- name : Set up MSBuild
146
123
uses : microsoft/setup-msbuild@v1.3
147
124
- name : Setup VSTest.console.exe
148
125
uses : darenm/Setup-VSTest@v1.2
149
126
- name : Checkout
150
- uses : actions/checkout@v3
151
- - name : Set up Node.js
152
- uses : actions/setup-node@v3.6.0
153
- with :
154
- node-version : 18.16.1
155
- cache : yarn
127
+ uses : actions/checkout@v4
128
+ - name : Setup project
129
+ uses : ./.github/actions/setup-project
156
130
- name : Install JS dependencies
157
131
run : |
158
132
yarn
@@ -167,19 +141,16 @@ jobs:
167
141
168
142
release :
169
143
name : Release
170
- needs : [format, review, android, ios, macos, windows]
144
+ needs : [android, ios, macos, windows]
171
145
if : github.event_name == 'push'
172
146
runs-on : ubuntu-22.04
173
147
steps :
174
148
- name : Checkout
175
- uses : actions/checkout@v3
149
+ uses : actions/checkout@v4
176
150
with :
177
151
persist-credentials : false
178
- - name : Set up Node.js
179
- uses : actions/setup-node@v3.6.0
180
- with :
181
- node-version : 18.16.1
182
- cache : yarn
152
+ - name : Setup project
153
+ uses : ./.github/actions/setup-project
183
154
- name : Install JS dependencies
184
155
run : |
185
156
yarn
0 commit comments