Created
March 23, 2018 13:02
-
-
Save azihsoyn/9ffdbf109767827f17f1ad03f348785b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: 2 | |
jobs: | |
build: | |
working_directory: /go/src/github.com/your_company/your_app | |
docker: | |
- image: circleci/golang:1.10.0 | |
environment: | |
- GOCACHE: "/tmp/go/cache" | |
steps: | |
... | |
- restore_cache: | |
keys: | |
- build-cache-{{ .Branch }}-{{ .Environment.CIRCLE_PREVIOUS_BUILD_NUM }} | |
paths: | |
- /tmp/go/cache | |
- run: | |
name: test | |
command: | | |
mkdir -p $GOCACHE | |
go build -v | |
go test -p 6 -race ./... | |
- save_cache: | |
key: build-cache-{{ .Branch }}-{{ .Environment.CIRCLE_BUILD_NUM }} | |
paths: | |
- /tmp/go/cache |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment