Skip to content

Commit 1f14047

Browse files
TheBuggedYRNHeshamMegid
authored andcommitted
[MOB-12052] Use Shallow Checkout in CI (#943)
The checkout step used to take around a minute due to the size of the repo (1 GB). With shallow checkouts, it gets down to one second.
1 parent 9ae3061 commit 1f14047

File tree

1 file changed

+13
-22
lines changed

1 file changed

+13
-22
lines changed

.circleci/config.yml

Lines changed: 13 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,23 @@
11
version: 2.1
2+
23
orbs:
34
android: circleci/android@2.0
5+
advanced-checkout: vsco/advanced-checkout@1.0.0
6+
47
jobs:
58
danger:
69
docker:
710
- image: circleci/ruby:2.6.4
811
steps:
9-
- checkout
12+
- advanced-checkout/shallow-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+
- advanced-checkout/shallow-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+
- advanced-checkout/shallow-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+
- advanced-checkout/shallow-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+
- advanced-checkout/shallow-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+
- advanced-checkout/shallow-checkout
10297
- run: yarn
10398
- run: cd example && yarn
10499
- run: cd example/ios && pod install
@@ -113,8 +108,7 @@ jobs:
113108
FL_OUTPUT_DIR: output
114109
INSTABUG_SOURCEMAPS_UPLOAD_DISABLE: true
115110
steps:
116-
- checkout:
117-
path: ~/project
111+
- advanced-checkout/shallow-checkout
118112
- run:
119113
name: Install CocoaPods
120114
command: sudo gem install cocoapods
@@ -153,12 +147,11 @@ jobs:
153147
macos:
154148
xcode: 13.4.1
155149
resource_class: large
156-
working_directory: ~/project
157150
environment:
158151
FL_OUTPUT_DIR: output
159152
INSTABUG_SOURCEMAPS_UPLOAD_DISABLE: true
160153
steps:
161-
- checkout
154+
- advanced-checkout/shallow-checkout
162155
- run:
163156
name: Install CocoaPods
164157
command: sudo gem install cocoapods
@@ -199,9 +192,8 @@ jobs:
199192
name: android/android-machine
200193
tag: 2022.03.1
201194
resource-class: large
202-
working_directory: ~/project
203195
steps:
204-
- checkout
196+
- advanced-checkout/shallow-checkout
205197
- run:
206198
name: Install Yarn
207199
command: npm install --global yarn
@@ -240,8 +232,7 @@ jobs:
240232
xcode: 13.4.1
241233
working_directory: '~'
242234
steps:
243-
- checkout:
244-
path: ~/project
235+
- advanced-checkout/shallow-checkout
245236
- run: git clone https://InstabugCI:$RELEASE_GITHUB_TOKEN@github.com/Instabug/Escape.git
246237
- run: cd Escape && swift build -c release
247238
- run: cd Escape/.build/release && cp -f Escape /usr/local/bin/escape

0 commit comments

Comments
 (0)