@@ -14,35 +14,63 @@ jobs:
14
14
steps :
15
15
- checkout
16
16
- run : git tag --list
17
+ # test checkout result
18
+ - run : echo "pwd=$(pwd)" && echo "HOME=$HOME" && ls -la && [ -d ".git" ] && echo "git checkout is correct" || exit 1
17
19
# Define one or more jobs which will utilize your orb's commands and parameters to validate your changes.
18
20
integration-test-checkout :
19
21
docker :
20
22
- image : cimg/base:stable
21
23
steps :
22
24
- git-shallow-clone/checkout
25
+ # test checkout result
26
+ - run : echo "pwd=$(pwd)" && echo "HOME=$HOME" && ls -la && [ -d ".git" ] && echo "git checkout is correct" || exit 1
23
27
integration-test-checkout_advanced :
24
28
docker :
25
29
- image : cimg/base:stable
26
30
steps :
27
31
- git-shallow-clone/checkout_advanced
32
+ # test checkout result
33
+ - run : echo "pwd=$(pwd)" && echo "HOME=$HOME" && ls -la && [ -d ".git" ] && echo "git checkout is correct" || exit 1
28
34
integration-test-checkout_advanced_alpine :
29
35
docker :
30
36
- image : circleci/redis:6.2.1-alpine
31
37
steps :
32
38
- run : apk update && apk add openssh git # openssh is required
33
39
- git-shallow-clone/checkout_advanced
40
+ # test checkout result
41
+ - run : echo "pwd=$(pwd)" && echo "HOME=$HOME" && ls -la && [ -d ".git" ] && echo "git checkout is correct" || exit 1
34
42
integration-test-checkout_advanced_fetchoptions :
35
43
docker :
36
44
- image : cimg/base:stable
37
45
steps :
38
46
- git-shallow-clone/checkout_advanced :
39
47
clone_options : " --depth 100 --single-branch"
40
48
fetch_options : " --depth 5"
49
+ # test checkout result
50
+ - run : echo "pwd=$(pwd)" && echo "HOME=$HOME" && ls -la && [ -d ".git" ] && echo "git checkout is correct" || exit 1
51
+ integration-test-checkout_advanced_keyscan_bitbucket :
52
+ docker :
53
+ - image : cimg/base:stable
54
+ steps :
55
+ - git-shallow-clone/checkout_advanced :
56
+ keyscan_bitbucket : true
57
+ # test checkout result
58
+ - run : echo "pwd=$(pwd)" && echo "HOME=$HOME" && ls -la && [ -d ".git" ] && echo "git checkout is correct" || exit 1
59
+ integration-test-checkout_advanced_keyscan_github :
60
+ docker :
61
+ - image : cimg/base:stable
62
+ steps :
63
+ - git-shallow-clone/checkout_advanced :
64
+ keyscan_github : true
65
+ # test checkout result
66
+ - run : echo "pwd=$(pwd)" && echo "HOME=$HOME" && ls -la && [ -d ".git" ] && echo "git checkout is correct" || exit 1
41
67
integration-test-checkout_advanced_macos :
42
68
macos :
43
69
xcode : 15.0.0 # see: https://circleci.com/docs/using-macos/
44
70
steps :
45
71
- git-shallow-clone/checkout_advanced
72
+ # test checkout result
73
+ - run : echo "pwd=$(pwd)" && echo "HOME=$HOME" && ls -la && [ -d ".git" ] && echo "git checkout is correct" || exit 1
46
74
integration-test-checkout_advanced_notags :
47
75
docker :
48
76
- image : cimg/base:stable
65
93
exit 1
66
94
fi
67
95
fi
96
+ # test checkout result
97
+ - run : echo "pwd=$(pwd)" && echo "HOME=$HOME" && ls -la && [ -d ".git" ] && echo "git checkout is correct" || exit 1
98
+ integration-test-checkout_advanced_path :
99
+ docker :
100
+ - image : cimg/base:stable
101
+ steps :
102
+ - git-shallow-clone/checkout_advanced :
103
+ path : src
104
+ # test checkout result
105
+ - run : echo "pwd=$(pwd)" && echo "HOME=$HOME" && ls -la && [ -d "./src/.git" ] && echo "git checkout is correct" || exit 1
68
106
integration-test-checkout_advanced_sourcecaching :
69
107
docker :
70
108
- image : cimg/base:stable
79
117
key : *source-cache
80
118
paths :
81
119
- " .git"
120
+ # test checkout result
121
+ - run : echo "pwd=$(pwd)" && echo "HOME=$HOME" && ls -la && [ -d ".git" ] && echo "git checkout is correct" || exit 1
82
122
integration-test-checkout_advanced_tags :
83
123
docker :
84
124
- image : cimg/base:stable
@@ -92,42 +132,65 @@ jobs:
92
132
git tag --list
93
133
count=$(git tag --list | wc -l)
94
134
if [ $count -eq 0 ]; then exit 1; fi
135
+ # test checkout result
136
+ - run : echo "pwd=$(pwd)" && echo "HOME=$HOME" && ls -la && [ -d ".git" ] && echo "git checkout is correct" || exit 1
137
+ integration-test-checkout_advanced_workingdir :
138
+ docker :
139
+ - image : cimg/base:stable
140
+ working_directory : ~/test-working-directory
141
+ steps :
142
+ - run : echo "pwd=$(pwd)" && echo "HOME=$HOME" && ls -la && [ "$(pwd)" == "$HOME/test-working-directory" ] && echo "working directory is correct" || exit 1
143
+ - git-shallow-clone/checkout_advanced
144
+ # test checkout result. checkout should be clone to `working_directory`.
145
+ - run : echo "pwd=$(pwd)" && echo "HOME=$HOME" && ls -la && [ -d "$HOME/test-working-directory/.git" ] && echo "git checkout is correct" || exit 1
95
146
integration-test-checkout_alpine :
96
147
docker :
97
148
- image : circleci/redis:6.2.1-alpine
98
149
steps :
99
150
- run : apk update && apk add openssh git # openssh is required
100
151
- git-shallow-clone/checkout
152
+ # test checkout result
153
+ - run : echo "pwd=$(pwd)" && echo "HOME=$HOME" && ls -la && [ -d ".git" ] && echo "git checkout is correct" || exit 1
101
154
integration-test-checkout_depth :
102
155
docker :
103
156
- image : cimg/base:stable
104
157
steps :
105
158
- git-shallow-clone/checkout :
106
159
depth : 5
107
160
fetch_depth : 10
161
+ # test checkout result
162
+ - run : echo "pwd=$(pwd)" && echo "HOME=$HOME" && ls -la && [ -d ".git" ] && echo "git checkout is correct" || exit 1
108
163
integration-test-checkout_fetchdepth :
109
164
docker :
110
165
- image : cimg/base:stable
111
166
steps :
112
167
- git-shallow-clone/checkout :
113
168
fetch_depth : 1
169
+ # test checkout result
170
+ - run : echo "pwd=$(pwd)" && echo "HOME=$HOME" && ls -la && [ -d ".git" ] && echo "git checkout is correct" || exit 1
114
171
integration-test-checkout_keyscan_bitbucket :
115
172
docker :
116
173
- image : cimg/base:stable
117
174
steps :
118
175
- git-shallow-clone/checkout :
119
176
keyscan_bitbucket : true
177
+ # test checkout result
178
+ - run : echo "pwd=$(pwd)" && echo "HOME=$HOME" && ls -la && [ -d ".git" ] && echo "git checkout is correct" || exit 1
120
179
integration-test-checkout_keyscan_github :
121
180
docker :
122
181
- image : cimg/base:stable
123
182
steps :
124
183
- git-shallow-clone/checkout :
125
184
keyscan_github : true
185
+ # test checkout result
186
+ - run : echo "pwd=$(pwd)" && echo "HOME=$HOME" && ls -la && [ -d ".git" ] && echo "git checkout is correct" || exit 1
126
187
integration-test-checkout_macos :
127
188
macos :
128
189
xcode : 15.0.0 # see: https://circleci.com/docs/using-macos/
129
190
steps :
130
191
- git-shallow-clone/checkout
192
+ # test checkout result
193
+ - run : echo "pwd=$(pwd)" && echo "HOME=$HOME" && ls -la && [ -d ".git" ] && echo "git checkout is correct" || exit 1
131
194
integration-test-checkout_notags :
132
195
docker :
133
196
- image : cimg/base:stable
@@ -149,12 +212,16 @@ jobs:
149
212
exit 1
150
213
fi
151
214
fi
215
+ # test checkout result
216
+ - run : echo "pwd=$(pwd)" && echo "HOME=$HOME" && ls -la && [ -d ".git" ] && echo "git checkout is correct" || exit 1
152
217
integration-test-checkout_path :
153
218
docker :
154
219
- image : cimg/base:stable
155
220
steps :
156
221
- git-shallow-clone/checkout :
157
222
path : src
223
+ # test checkout result
224
+ - run : echo "pwd=$(pwd)" && echo "HOME=$HOME" && ls -la && [ -d "./src/.git" ] && echo "git checkout is correct" || exit 1
158
225
integration-test-checkout_sourcechching :
159
226
docker :
160
227
- image : cimg/base:stable
@@ -169,6 +236,8 @@ jobs:
169
236
key : *source-cache
170
237
paths :
171
238
- " .git"
239
+ # test checkout result
240
+ - run : echo "pwd=$(pwd)" && echo "HOME=$HOME" && ls -la && [ -d ".git" ] && echo "git checkout is correct" || exit 1
172
241
integration-test-checkout_tags :
173
242
docker :
174
243
- image : cimg/base:stable
@@ -181,6 +250,17 @@ jobs:
181
250
git tag --list
182
251
count=$(git tag --list | wc -l)
183
252
if [ $count -eq 0 ]; then exit 1; fi
253
+ # test checkout result
254
+ - run : echo "pwd=$(pwd)" && echo "HOME=$HOME" && ls -la && [ -d ".git" ] && echo "git checkout is correct" || exit 1
255
+ integration-test-checkout_workingdir :
256
+ docker :
257
+ - image : cimg/base:stable
258
+ working_directory : ~/test-working-directory
259
+ steps :
260
+ - run : echo "pwd=$(pwd)" && echo "HOME=$HOME" && ls -la && [ "$(pwd)" == "$HOME/test-working-directory" ] && echo "working directory is correct" || exit 1
261
+ - git-shallow-clone/checkout
262
+ # test checkout result. checkout should be clone to `working_directory`.
263
+ - run : echo "pwd=$(pwd)" && echo "HOME=$HOME" && ls -la && [ -d "$HOME/test-working-directory/.git" ] && echo "git checkout is correct" || exit 1
184
264
integration-test-api-dispatch :
185
265
docker :
186
266
- image : cimg/base:stable
@@ -203,22 +283,32 @@ workflows:
203
283
# Run any integration tests defined within the `jobs` key.
204
284
- normal-checkout :
205
285
filters : *filters
206
- - integration-test-checkout :
207
- filters : *filters
286
+ # ---- checkout_advanced ----
208
287
- integration-test-checkout_advanced :
209
288
filters : *filters
210
289
- integration-test-checkout_advanced_alpine :
211
290
filters : *filters
212
291
- integration-test-checkout_advanced_fetchoptions :
213
292
filters : *filters
293
+ - integration-test-checkout_advanced_keyscan_bitbucket :
294
+ filters : *filters
295
+ - integration-test-checkout_advanced_keyscan_github :
296
+ filters : *filters
214
297
# - integration-test-checkout_advanced_macos:
215
298
# filters: *filters
216
299
- integration-test-checkout_advanced_notags :
217
300
filters : *filters
301
+ - integration-test-checkout_advanced_path :
302
+ filters : *filters
218
303
- integration-test-checkout_advanced_sourcecaching :
219
304
filters : *filters
220
305
- integration-test-checkout_advanced_tags :
221
306
filters : *filters
307
+ - integration-test-checkout_advanced_workingdir :
308
+ filters : *filters
309
+ # ---- checkout_advanced ----
310
+ - integration-test-checkout :
311
+ filters : *filters
222
312
- integration-test-checkout_alpine :
223
313
filters : *filters
224
314
- integration-test-checkout_depth :
@@ -239,6 +329,9 @@ workflows:
239
329
filters : *filters
240
330
- integration-test-checkout_tags :
241
331
filters : *filters
332
+ - integration-test-checkout_workingdir :
333
+ filters : *filters
334
+ # ---- api ----
242
335
- integration-test-api-dispatch :
243
336
filters : *filters
244
337
context : api
@@ -250,13 +343,20 @@ workflows:
250
343
pub-type : production
251
344
requires :
252
345
- orb-tools/pack
253
- - integration-test-checkout
346
+ # ---- checkout_advanced ----
254
347
- integration-test-checkout_advanced
255
348
- integration-test-checkout_advanced_alpine
256
349
- integration-test-checkout_advanced_fetchoptions
350
+ - integration-test-checkout_advanced_keyscan_bitbucket
351
+ - integration-test-checkout_advanced_keyscan_github
257
352
# - integration-test-checkout_advanced_macos
258
353
- integration-test-checkout_advanced_notags
354
+ - integration-test-checkout_advanced_path
355
+ - integration-test-checkout_advanced_sourcecaching
259
356
- integration-test-checkout_advanced_tags
357
+ - integration-test-checkout_advanced_workingdir
358
+ # ---- checkout ----
359
+ - integration-test-checkout
260
360
- integration-test-checkout_alpine
261
361
- integration-test-checkout_depth
262
362
- integration-test-checkout_fetchdepth
@@ -265,7 +365,11 @@ workflows:
265
365
# - integration-test-checkout_macos
266
366
- integration-test-checkout_notags
267
367
- integration-test-checkout_path
368
+ - integration-test-checkout_sourcechching
268
369
- integration-test-checkout_tags
370
+ - integration-test-checkout_workingdir
371
+ # ---- api ----
372
+ - integration-test-api-dispatch
269
373
context : orb-publisher
270
374
filters :
271
375
branches :
0 commit comments