Skip to content

Commit c6ca363

Browse files
committed
Use Shallow Checkout in CI
1 parent ab1755c commit c6ca363

File tree

1 file changed

+27
-29
lines changed

1 file changed

+27
-29
lines changed

.circleci/config.yml

Lines changed: 27 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,23 @@
11
version: 2.1
2+
23
orbs:
34
android: circleci/[email protected]
5+
git-shallow-clone: guitarrapc/[email protected]
6+
47
jobs:
58
danger:
69
docker:
710
- image: circleci/ruby:2.6.4
811
steps:
9-
- checkout
12+
- git-shallow-clone/checkout
1013
- run: bundle install
1114
- run: bundle exec danger
1215

1316
lint:
14-
working_directory: ~/project
1517
docker:
1618
- image: cimg/node:16.17.1
1719
steps:
18-
- checkout
20+
- git-shallow-clone/checkout
1921
- run:
2022
name: Install Node Packages
2123
command: yarn
@@ -27,12 +29,10 @@ jobs:
2729
command: yarn lint:ci
2830

2931
test_module:
30-
working_directory: ~/project
3132
docker:
3233
- image: cimg/node:16.17.1
3334
steps:
34-
- checkout:
35-
path: ~/project
35+
- git-shallow-clone/checkout
3636

3737
- run:
3838
name: Install Node Packages
@@ -61,10 +61,8 @@ jobs:
6161
executor:
6262
name: android/android-machine
6363
tag: '2022.03.1'
64-
working_directory: ~/project
6564
steps:
66-
- checkout:
67-
path: ~/project
65+
- git-shallow-clone/checkout
6866
- run:
6967
name: Install Yarn
7068
command: npm install -g yarn
@@ -79,10 +77,8 @@ jobs:
7977
validate_shell_files:
8078
machine:
8179
image: ubuntu-2004:current
82-
working_directory: ~/project
8380
steps:
84-
- checkout:
85-
path: ~/project
81+
- git-shallow-clone/checkout
8682
- run:
8783
name: Validate Android Script
8884
command: bash -n android/upload_sourcemap.sh
@@ -96,9 +92,8 @@ jobs:
9692
sync_generated_files:
9793
macos:
9894
xcode: 13.4.1
99-
working_directory: ~/project
10095
steps:
101-
- checkout
96+
- git-shallow-clone/checkout
10297
- run: yarn
10398
- run: cd example && yarn
10499
- run: cd example/ios && pod install
@@ -113,8 +108,10 @@ jobs:
113108
FL_OUTPUT_DIR: output
114109
INSTABUG_SOURCEMAPS_UPLOAD_DISABLE: true
115110
steps:
116-
- checkout:
117-
path: ~/project
111+
- git-shallow-clone/checkout:
112+
path: /Users/distiller/repo
113+
# Fix for https://github.com/guitarrapc/git-shallow-clone-orb/issues/33
114+
- run: mv ~/repo/* ~/project/
118115
- run:
119116
name: Install CocoaPods
120117
command: sudo gem install cocoapods
@@ -153,12 +150,11 @@ jobs:
153150
macos:
154151
xcode: 13.4.1
155152
resource_class: large
156-
working_directory: ~/project
157153
environment:
158154
FL_OUTPUT_DIR: output
159155
INSTABUG_SOURCEMAPS_UPLOAD_DISABLE: true
160156
steps:
161-
- checkout
157+
- git-shallow-clone/checkout
162158
- run:
163159
name: Install CocoaPods
164160
command: sudo gem install cocoapods
@@ -199,9 +195,8 @@ jobs:
199195
name: android/android-machine
200196
tag: 2022.03.1
201197
resource-class: large
202-
working_directory: ~/project
203198
steps:
204-
- checkout
199+
- git-shallow-clone/checkout
205200
- run:
206201
name: Install Yarn
207202
command: npm install --global yarn
@@ -240,13 +235,15 @@ jobs:
240235
xcode: 13.4.1
241236
working_directory: '~'
242237
steps:
243-
- checkout:
244-
path: ~/project
238+
- git-shallow-clone/checkout:
239+
path: /Users/distiller/repo
240+
# Fix for https://github.com/guitarrapc/git-shallow-clone-orb/issues/33
241+
- run: mv ~/repo/* ~/project/
245242
- run: git clone https://InstabugCI:[email protected]/Instabug/Escape.git
246243
- run: cd Escape && swift build -c release
247244
- run: cd Escape/.build/release && cp -f Escape /usr/local/bin/escape
248245
- run: cd project && yarn && yarn build
249-
- run: cd project && Escape react-native publish
246+
# - run: cd project && Escape react-native publish
250247

251248
workflows:
252249
publish:
@@ -275,9 +272,10 @@ workflows:
275272
filters:
276273
branches:
277274
only: master
278-
- publish:
279-
requires:
280-
- hold
281-
filters:
282-
branches:
283-
only: master
275+
- publish
276+
# - publish:
277+
# requires:
278+
# - hold
279+
# filters:
280+
# branches:
281+
# only: master

0 commit comments

Comments
 (0)