Skip to content

Commit f870b80

Browse files
authored
Merge pull request #5182 from Minnozz/patch-1
circleci: enable .git directory caching
2 parents 49df585 + 6f70e69 commit f870b80

File tree

1 file changed

+19
-13
lines changed

1 file changed

+19
-13
lines changed

.circleci/config.yml

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,26 +5,32 @@ jobs: # a collection of steps
55
docker: # run the steps with Docker
66
- image: circleci/node:dubnium # ...with this image as the primary container; this is where all `steps` will run
77
steps: # a collection of executable commands
8+
- restore_cache: # try to restore .git folder from cache to speed up checkout
9+
keys:
10+
- source-v1-{{ .Branch }}-{{ .Revision }}
11+
- source-v1-{{ .Branch }}-
12+
- source-v1-
813
- checkout # special step to check out source code to working directory
14+
- run:
15+
name: "Pull git submodules"
16+
command: |
17+
git submodule sync
18+
git submodule update --init
19+
- save_cache: # write .git folder to cache
20+
key: source-v1-{{ .Branch }}-{{ .Revision }}
21+
paths:
22+
- ".git"
23+
924
- run:
10-
name: "Setting env variables"
25+
name: "Set environment variables"
1126
command: |
1227
echo 'export BS_TRAVIS_CI=1' >> $BASH_ENV
1328
echo 'export NINJA_FORCE_REBUILD=1' >> $BASH_ENV
1429
echo 'export OCAMLRUNPARAM="b"' >> $BASH_ENV
1530
- run:
16-
name: "Check env variables"
31+
name: "Check environment variables"
1732
command: |
1833
echo BS_TRAVIS_CI ${BS_TRAVIS_CI}
19-
- run:
20-
name: "Pull Submodules"
21-
command: |
22-
git submodule init
23-
git submodule update
24-
- run:
25-
name: ci-install
26-
command: npm ci # `npm ci` is not available on node v8
2734
28-
- run: # run tests
29-
name: test
30-
command: npm test
35+
- run: npm ci # `npm ci` is not available on node v8
36+
- run: npm test

0 commit comments

Comments
 (0)