Skip to content
This repository was archived by the owner on Dec 20, 2024. It is now read-only.

Commit 189a6cc

Browse files
committed
add cache in circleci
Signed-off-by: yeya24 <[email protected]>
1 parent dfd3a8c commit 189a6cc

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

.circleci/config.yml

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,20 @@
1-
# Golang CircleCI 2.0 configuration file
2-
#
3-
# Check https://circleci.com/docs/2.0/language-go/ for more details
4-
version: 2
1+
# Golang CircleCI 2.1 configuration file
2+
version: 2.1
3+
4+
orbs:
5+
# See https://circleci.com/orbs/registry/orb/circleci/go.
6+
go: circleci/[email protected]
7+
58
jobs:
69
linters-check:
710
docker:
8-
# this image is build from Dockerfile
11+
# this image is built from Dockerfile
912
# https://github.com/pouchcontainer/pouchlinter/blob/master/Dockerfile
1013
- image: pouchcontainer/pouchlinter:v0.2.4
1114
working_directory: /go/src/github.com/dragonflyoss/Dragonfly
1215
steps:
1316
- checkout
17+
- go/load-cache
1418
- run:
1519
name: use markdownlint v0.5.0 to lint markdown file (https://github.com/markdownlint/markdownlint)
1620
command: |
@@ -53,13 +57,15 @@ jobs:
5357
name: boilerplate check
5458
command: |
5559
make boilerplate-check
60+
- go/save-cache
5661

5762
unit-test-golang:
5863
docker:
5964
- image: circleci/golang:1.12.10
6065
working_directory: /go/src/github.com/dragonflyoss/Dragonfly
6166
steps:
6267
- checkout
68+
- go/load-cache
6369
- run:
6470
name: build client
6571
command: |
@@ -73,20 +79,23 @@ jobs:
7379
- run:
7480
name: rm coverage.txt
7581
command: rm coverage.txt
82+
- go/save-cache
7683

7784
api-integration-test:
7885
docker:
7986
- image: circleci/golang:1.12.10
8087
working_directory: /go/src/github.com/dragonflyoss/Dragonfly
8188
steps:
8289
- checkout
90+
- go/load-cache
8391
- run:
8492
name: build dragonfly & run all integration test cases in test
8593
command: |
8694
echo "building..."
8795
make build > /dev/null
8896
echo "start integration test..."
8997
make integration-test
98+
- go/save-cache
9099

91100
workflows:
92101
version: 2

0 commit comments

Comments
 (0)