version: 2 jobs: build: docker: - image: nixorg/nix:circleci steps: - checkout - restore_cache: key: stack-deps-{{ checksum "stack.yaml" }} - run: name: Install Stack command: | apk update --no-progress && apk --no-progress add ca-certificates bash nix-env -f nixpkgs.nix -iA stack - run: name: Setup build toolchain command: stack --nix setup - run: name: Building dependencies command: stack --nix test --only-snapshot --prefetch - save_cache: paths: - "~/.stack" key: stack-deps-{{ checksum "stack.yaml" }} - run: name: Building command: stack --nix build --pedantic - run: name: Building tests command: stack --nix test --pedantic --no-run-tests - run: name: Running tests command: stack --nix test