diff --git a/.circleci/config.yml b/.circleci/config.yml index f143df3ca94bbd145fa143ecb8411a983e2558fa..c5879832b726d0ceede76e000ed47a532d61e00d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -92,6 +92,17 @@ jobs: # while to build. no_output_timeout: "20m" + - save_cache: + # We can save the stack cache right here. It will have everything + # we want in it now that the dependencies have been built. And this + # way we get to save the cache whether or not the test suite goes on + # to succeed. + name: "Cache Dependencies" + key: paymentserver-v1-{{ checksum "stack.yaml" }}-{{ checksum "PaymentServer.cabal" }} + paths: + - "/root/.stack" + - ".stack-work" + - run: name: "Run Tests" command: | @@ -125,13 +136,6 @@ jobs: --no-haddock-deps" nix-shell shell.nix --run "$BUILD" - - save_cache: - name: "Cache Dependencies" - key: paymentserver-v1-{{ checksum "stack.yaml" }}-{{ checksum "PaymentServer.cabal" }} - paths: - - "/root/.stack" - - ".stack-work" - - save_cache: name: "Cache Nix Store Paths" key: paymentserver-nix-store-v1-{{ .Environment.NIXPKGS_REV }}