Skip to content

Commit

Permalink
enable go modules in circleci
Browse files Browse the repository at this point in the history
Also add mod caching as I currently am not using a vendor/ directory.
  • Loading branch information
eikenb committed Aug 2, 2019
1 parent 2220446 commit 15110cf
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ jobs:
working_directory: /go/src/github.com/hashicorp/consul-template
steps:
- checkout
- restore_cache:
keys:
- ct-modcache-v1-{{ checksum "go.mod" }}
- run: |
curl -sLo consul.zip https://releases.hashicorp.com/consul/${CONSUL_VERSION}/consul_${CONSUL_VERSION}_linux_amd64.zip
unzip consul.zip
Expand All @@ -17,4 +20,11 @@ jobs:
curl -sLo vault.zip https://releases.hashicorp.com/vault/${VAULT_VERSION}/vault_${VAULT_VERSION}_linux_amd64.zip
unzip vault.zip
sudo cp vault /usr/local/bin/
- run: make test
- run: |
export GO111MODULE=on
make test
- save_cache:
key: ct-modcache-v1-{{ checksum "go.mod" }}
paths:
- /go/pkg/mod

0 comments on commit 15110cf

Please sign in to comment.