reordered save cache, added back explicit go mod download
diff --git a/.circleci/config.yml b/.circleci/config.yml
index a2730d4..7289c6b 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -24,7 +24,14 @@
- restore_cache: # restore cache from dev-build job
keys:
- go-version-modcache-v1-{{ checksum "go.mod" }}
- - go-version-modcache-v1
+
+ - run: go mod download
+
+ # Save go module cache if the go.mod file has changed
+ - save_cache:
+ key: go-version-modcache-v1-{{ checksum "go.mod" }}
+ paths:
+ - "/go/pkg/mod"
# check go fmt output because it does not report non-zero when there are fmt changes
- run:
@@ -46,12 +53,6 @@
- store_artifacts:
path: *TEST_RESULTS_PATH
- # Save go module cache if the go.mod file has changed
- - save_cache:
- key: go-version-modcache-v1-{{ checksum "go.mod" }}
- paths:
- - "/go/pkg/mod"
-
workflows:
version: 2
test-and-build: