Skip to content

Commit df8d9af

Browse files
committed
Use Shallow Checkout in CI
1 parent a282b40 commit df8d9af

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,20 +1,22 @@
11
version: 2.1
2+
23
orbs:
34
android: circleci/android@2.0
5+
git-shallow-clone: guitarrapc/git-shallow-clone@2.4.1
6+
47
jobs:
58
danger:
69
docker:
710
- image: dantoml/danger:latest
811
steps:
9-
- checkout
12+
- git-shallow-clone/checkout
1013
- run: danger
1114

1215
lint:
13-
working_directory: ~/project
1416
docker:
1517
- image: cimg/node:16.17.1
1618
steps:
17-
- checkout
19+
- git-shallow-clone/checkout
1820
- run:
1921
name: Install Node Packages
2022
command: yarn
@@ -26,12 +28,10 @@ jobs:
2628
command: yarn lint:ci
2729

2830
test_module:
29-
working_directory: ~/project
3031
docker:
3132
- image: cimg/node:16.17.1
3233
steps:
33-
- checkout:
34-
path: ~/project
34+
- git-shallow-clone/checkout
3535

3636
- run:
3737
name: Install Node Packages
@@ -60,10 +60,8 @@ jobs:
6060
executor:
6161
name: android/android-machine
6262
tag: '2022.03.1'
63-
working_directory: ~/project
6463
steps:
65-
- checkout:
66-
path: ~/project
64+
- git-shallow-clone/checkout
6765
- run:
6866
name: Install Yarn
6967
command: npm install -g yarn
@@ -78,10 +76,8 @@ jobs:
7876
validate_shell_files:
7977
machine:
8078
image: ubuntu-2004:current
81-
working_directory: ~/project
8279
steps:
83-
- checkout:
84-
path: ~/project
80+
- git-shallow-clone/checkout
8581
- run:
8682
name: Validate Android Script
8783
command: bash -n android/upload_sourcemap.sh
@@ -95,9 +91,8 @@ jobs:
9591
sync_generated_files:
9692
macos:
9793
xcode: 13.4.1
98-
working_directory: ~/project
9994
steps:
100-
- checkout
95+
- git-shallow-clone/checkout
10196
- run: yarn
10297
- run: cd example && yarn
10398
- run: cd example/ios && pod install
@@ -112,8 +107,10 @@ jobs:
112107
FL_OUTPUT_DIR: output
113108
INSTABUG_SOURCEMAPS_UPLOAD_DISABLE: true
114109
steps:
115-
- checkout:
116-
path: ~/project
110+
- git-shallow-clone/checkout:
111+
path: /Users/distiller/repo
112+
# Fix for https://github.com/guitarrapc/git-shallow-clone-orb/issues/33
113+
- run: mv ~/repo/* ~/project/
117114
- run:
118115
name: Install CocoaPods
119116
command: sudo gem install cocoapods
@@ -152,12 +149,11 @@ jobs:
152149
macos:
153150
xcode: 13.4.1
154151
resource_class: large
155-
working_directory: ~/project
156152
environment:
157153
FL_OUTPUT_DIR: output
158154
INSTABUG_SOURCEMAPS_UPLOAD_DISABLE: true
159155
steps:
160-
- checkout
156+
- git-shallow-clone/checkout
161157
- run:
162158
name: Install CocoaPods
163159
command: sudo gem install cocoapods
@@ -198,9 +194,8 @@ jobs:
198194
name: android/android-machine
199195
tag: 2022.03.1
200196
resource-class: large
201-
working_directory: ~/project
202197
steps:
203-
- checkout
198+
- git-shallow-clone/checkout
204199
- run:
205200
name: Install Yarn
206201
command: npm install --global yarn
@@ -239,13 +234,15 @@ jobs:
239234
xcode: 13.4.1
240235
working_directory: '~'
241236
steps:
242-
- checkout:
243-
path: ~/project
237+
- git-shallow-clone/checkout:
238+
path: /Users/distiller/repo
239+
# Fix for https://github.com/guitarrapc/git-shallow-clone-orb/issues/33
240+
- run: mv ~/repo/* ~/project/
244241
- run: git clone https://InstabugCI:$RELEASE_GITHUB_TOKEN@github.com/Instabug/Escape.git
245242
- run: cd Escape && swift build -c release
246243
- run: cd Escape/.build/release && cp -f Escape /usr/local/bin/escape
247244
- run: cd project && yarn && yarn build
248-
- run: cd project && Escape react-native publish
245+
# - run: cd project && Escape react-native publish
249246

250247
workflows:
251248
publish:
@@ -274,9 +271,10 @@ workflows:
274271
filters:
275272
branches:
276273
only: master
277-
- publish:
278-
requires:
279-
- hold
280-
filters:
281-
branches:
282-
only: master
274+
- publish
275+
# - publish:
276+
# requires:
277+
# - hold
278+
# filters:
279+
# branches:
280+
# only: master

0 commit comments

Comments
 (0)