@@ -40,6 +40,115 @@ runs:
40
40
shell : bash
41
41
run : curl -L "https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/5.4.0/openapi-generator-cli-5.4.0.jar" > /tmp/openapi-generator-cli.jar
42
42
43
+ # Restore bundled specs: used during 'client' generation or pushing the 'codegen'
44
+ - name : Restore built abtesting spec
45
+ if : ${{ inputs.job == 'client' || inputs.job == 'codegen' }}
46
+ uses : actions/cache@v2
47
+ with :
48
+ path : specs/bundled/abtesting.yml
49
+ key : |
50
+ ${{ env.CACHE_VERSION }}-${{
51
+ hashFiles(
52
+ 'specs/abtesting/**',
53
+ 'specs/common/**'
54
+ )}}
55
+
56
+ - name : Restore built analytics spec
57
+ if : ${{ inputs.job == 'client' || inputs.job == 'codegen' }}
58
+ uses : actions/cache@v2
59
+ with :
60
+ path : specs/bundled/analytics.yml
61
+ key : |
62
+ ${{ env.CACHE_VERSION }}-${{
63
+ hashFiles(
64
+ 'specs/analytics/**',
65
+ 'specs/common/**'
66
+ )}}
67
+
68
+ - name : Restore built insights spec
69
+ if : ${{ inputs.job == 'client' || inputs.job == 'codegen' }}
70
+ uses : actions/cache@v2
71
+ with :
72
+ path : specs/bundled/insights.yml
73
+ key : |
74
+ ${{ env.CACHE_VERSION }}-${{
75
+ hashFiles(
76
+ 'specs/insights/**',
77
+ 'specs/common/**'
78
+ )}}
79
+
80
+ - name : Restore built personalization spec
81
+ if : ${{ inputs.job == 'client' || inputs.job == 'codegen' }}
82
+ uses : actions/cache@v2
83
+ with :
84
+ path : specs/bundled/personalization.yml
85
+ key : |
86
+ ${{ env.CACHE_VERSION }}-${{
87
+ hashFiles(
88
+ 'specs/personalization/**',
89
+ 'specs/common/**'
90
+ )}}
91
+
92
+ - name : Restore built predict spec
93
+ if : ${{ inputs.job == 'client' || inputs.job == 'codegen' }}
94
+ uses : actions/cache@v2
95
+ with :
96
+ path : specs/bundled/predict.yml
97
+ key : |
98
+ ${{ env.CACHE_VERSION }}-${{
99
+ hashFiles(
100
+ 'specs/predict/**',
101
+ 'specs/common/**'
102
+ )}}
103
+
104
+ - name : Restore built query-suggestions spec
105
+ if : ${{ inputs.job == 'client' || inputs.job == 'codegen' }}
106
+ uses : actions/cache@v2
107
+ with :
108
+ path : specs/bundled/query-suggestions.yml
109
+ key : |
110
+ ${{ env.CACHE_VERSION }}-${{
111
+ hashFiles(
112
+ 'specs/query-suggestions/**',
113
+ 'specs/common/**'
114
+ )}}
115
+
116
+ - name : Restore built recommend spec
117
+ if : ${{ inputs.job == 'client' || inputs.job == 'codegen' }}
118
+ uses : actions/cache@v2
119
+ with :
120
+ path : specs/bundled/recommend.yml
121
+ key : |
122
+ ${{ env.CACHE_VERSION }}-${{
123
+ hashFiles(
124
+ 'specs/recommend/**',
125
+ 'specs/common/**'
126
+ )}}
127
+
128
+ - name : Restore built search spec
129
+ if : ${{ inputs.job == 'client' || inputs.job == 'codegen' }}
130
+ uses : actions/cache@v2
131
+ with :
132
+ path : specs/bundled/search.yml
133
+ key : |
134
+ ${{ env.CACHE_VERSION }}-${{
135
+ hashFiles(
136
+ 'specs/search/**',
137
+ 'specs/common/**'
138
+ )}}
139
+
140
+ - name : Restore built sources spec
141
+ if : ${{ inputs.job == 'client' || inputs.job == 'codegen' }}
142
+ uses : actions/cache@v2
143
+ with :
144
+ path : specs/bundled/sources.yml
145
+ key : |
146
+ ${{ env.CACHE_VERSION }}-${{
147
+ hashFiles(
148
+ 'specs/sources/**',
149
+ 'specs/common/**'
150
+ )}}
151
+
43
152
# Restore JavaScript clients utils: used during 'javascript' generation or 'cts'
44
153
- name : Restore built JavaScript common client
45
154
if : ${{ inputs.language == 'javascript' || inputs.job == 'cts' }}
77
186
'!clients/algoliasearch-client-javascript/packages/requester-browser-xhr/dist'
78
187
)}}
79
188
80
- # Restore JavaScript clients: used during 'cts'
189
+ # Restore JavaScript clients: used during 'cts' or 'codegen'
81
190
- name : Restore built JavaScript algoliasearch client
82
- if : ${{ inputs.job == 'cts'}}
191
+ if : ${{ inputs.job == 'cts' || inputs.job == 'codegen' }}
83
192
uses : actions/cache@v2
84
193
with :
85
194
path : clients/algoliasearch-client-javascript/packages/algoliasearch
91
200
)}}
92
201
93
202
- name : Restore built JavaScript search client
94
- if : ${{ inputs.job == 'cts' }}
203
+ if : ${{ inputs.job == 'cts' || inputs.job == 'codegen' }}
95
204
uses : actions/cache@v2
96
205
with :
97
206
path : clients/algoliasearch-client-javascript/packages/client-search
@@ -104,7 +213,7 @@ runs:
104
213
)}}
105
214
106
215
- name : Restore built JavaScript recommend client
107
- if : ${{ inputs.job == 'cts' }}
216
+ if : ${{ inputs.job == 'cts' || inputs.job == 'codegen' }}
108
217
uses : actions/cache@v2
109
218
with :
110
219
path : clients/algoliasearch-client-javascript/packages/recommend
@@ -117,7 +226,7 @@ runs:
117
226
)}}
118
227
119
228
- name : Restore built JavaScript query-suggestions client
120
- if : ${{ inputs.job == 'cts' }}
229
+ if : ${{ inputs.job == 'cts' || inputs.job == 'codegen' }}
121
230
uses : actions/cache@v2
122
231
with :
123
232
path : clients/algoliasearch-client-javascript/packages/client-query-suggestions
@@ -130,7 +239,7 @@ runs:
130
239
)}}
131
240
132
241
- name : Restore built JavaScript personalization client
133
- if : ${{ inputs.job == 'cts' }}
242
+ if : ${{ inputs.job == 'cts' || inputs.job == 'codegen' }}
134
243
uses : actions/cache@v2
135
244
with :
136
245
path : clients/algoliasearch-client-javascript/packages/client-personalization
@@ -143,7 +252,7 @@ runs:
143
252
)}}
144
253
145
254
- name : Restore built JavaScript analytics client
146
- if : ${{ inputs.job == 'cts' }}
255
+ if : ${{ inputs.job == 'cts' || inputs.job == 'codegen' }}
147
256
uses : actions/cache@v2
148
257
with :
149
258
path : clients/algoliasearch-client-javascript/packages/client-analytics
@@ -156,7 +265,7 @@ runs:
156
265
)}}
157
266
158
267
- name : Restore built JavaScript abtesting client
159
- if : ${{ inputs.job == 'cts' }}
268
+ if : ${{ inputs.job == 'cts' || inputs.job == 'codegen' }}
160
269
uses : actions/cache@v2
161
270
with :
162
271
path : clients/algoliasearch-client-javascript/packages/client-abtesting
@@ -169,7 +278,7 @@ runs:
169
278
)}}
170
279
171
280
- name : Restore built JavaScript insights client
172
- if : ${{ inputs.job == 'cts' }}
281
+ if : ${{ inputs.job == 'cts' || inputs.job == 'codegen' }}
173
282
uses : actions/cache@v2
174
283
with :
175
284
path : clients/algoliasearch-client-javascript/packages/client-insights
@@ -182,7 +291,7 @@ runs:
182
291
)}}
183
292
184
293
- name : Restore built JavaScript sources client
185
- if : ${{ inputs.job == 'cts' }}
294
+ if : ${{ inputs.job == 'cts' || inputs.job == 'codegen' }}
186
295
uses : actions/cache@v2
187
296
with :
188
297
path : clients/algoliasearch-client-javascript/packages/client-sources
@@ -195,7 +304,7 @@ runs:
195
304
)}}
196
305
197
306
- name : Restore built JavaScript predict client
198
- if : ${{ inputs.job == 'cts' }}
307
+ if : ${{ inputs.job == 'cts' || inputs.job == 'codegen' }}
199
308
uses : actions/cache@v2
200
309
with :
201
310
path : clients/algoliasearch-client-javascript/packages/client-predict
@@ -207,16 +316,29 @@ runs:
207
316
'specs/bundled/predict.yml'
208
317
)}}
209
318
210
- # Restore Java clients: used during 'cts'
319
+ # Restore Java clients: used during 'cts' or 'codegen'
211
320
- name : Restore built Java client
212
- if : ${{ inputs.job == 'cts' }}
321
+ if : ${{ inputs.job == 'cts' || inputs.job == 'codegen' }}
213
322
uses : actions/cache@v2
214
323
with :
215
324
path : clients/algoliasearch-client-java-2
216
325
key : |
217
326
${{ env.CACHE_VERSION }}-${{
218
327
hashFiles(
219
- 'clients/algoliasearch-client-java-2/client-predict/**',
220
- '!clients/algoliasearch-client-java-2/client-predict/target',
328
+ 'clients/algoliasearch-client-java-2/**',
329
+ '!clients/algoliasearch-client-java-2/target',
330
+ 'specs/bundled/search.yml'
331
+ )}}
332
+
333
+ # Restore PHP clients: used during 'cts' or 'codegen'
334
+ - name : Restore built PHP client
335
+ if : ${{ inputs.job == 'cts' || inputs.job == 'codegen' }}
336
+ uses : actions/cache@v2
337
+ with :
338
+ path : clients/algoliasearch-client-php
339
+ key : |
340
+ ${{ env.CACHE_VERSION }}-${{
341
+ hashFiles(
342
+ 'clients/algoliasearch-client-php/*',
221
343
'specs/bundled/search.yml'
222
344
)}}
0 commit comments