git.iko.soy/typeable/rollbar-hs
on master help sign in
Split out test targets

It looks like, when we switch jobs in CI the new checkout has newer timestamps than what's in the make cache. Rather than dealing with that anymore, we alter the targets. We can change `test` to ensure builds are up to date. Then we can leave the individual test targets to run whatever is there. In CI this means we can set the workflow to run the tests separately.

commitb968bb53a49993dfd57c9c13d5b3ca1d49631648 authorjoneshf <jones3.hardy@gmail.com> dateSun 29 Jul 2018, 13:07 (8 years ago) parentc61934d
2 files changed+13−9
.circleci/config.yml+4−5 Makefile+9−4
.circleci/config.yml+4−5
@@ -17,7 +17,6 @@ jobs:
1717 - persist_to_workspace:
1818 root: .
1919 paths:
20− - .make
2120 - dist
2221 - save_cache:
2322 key: v1-stack-{{ checksum "package.yaml" }}-{{ checksum "stack.yaml" }}
@@ -41,7 +40,7 @@ jobs:
4140 name: Build sdist
4241 command: make sdist
4342
44− test:
43+ doc-test:
4544 docker:
4645 - image: haskell:8.2.2
4746 steps:
@@ -49,8 +48,8 @@ jobs:
4948 - attach_workspace:
5049 at: .
5150 - run:
52− name: Test
53− command: make test
51+ name: Doc test
52+ command: make test-doc-test
5453
5554workflows:
5655 version: 2
@@ -58,6 +57,6 @@ workflows:
5857 jobs:
5958 - compile
6059 - sdist
61− - test:
60+ - doc-test:
6261 requires:
6362 - compile
Makefile+9−4
@@ -22,12 +22,13 @@ $(CABAL_FILE): package.yaml
2222 # We can run `hpack` indirectly with little overhead.
2323 $(STACK) $(STACK_FLAGS) build --dry-run
2424
25−$(DOC_TEST): $(EMPTY)/build
26− $@
25+$(DOC_TEST):
26+ rm -f $(EMPTY)/build
27+ $(MAKE) $(EMPTY)/build
2728
2829$(EMPTY)/build: $(EMPTY)/stack-setup README.md Setup.hs package.yaml stack.yaml src/**/*.hs test/**/*.hs | $(DIST)
2930 $(STACK) $(STACK_FLAGS) build --no-run-tests --test
30− cp -R $$($(STACK) $(STACK_FLAGS) path --dist-dir)/build $(DIST)/build
31+ cp -R $$($(STACK) $(STACK_FLAGS) path --dist-dir)/build $(DIST)
3132 touch $@
3233
3334$(EMPTY)/stack-setup: | $(EMPTY)
@@ -57,7 +58,11 @@ sdist: cabal-check | $(DIST)
5758 $(CABAL) sdist
5859
5960.PHONY: test
60−test: $(DOC_TEST)
61+test: $(EMPTY)/build test-doc-test
62+
63+.PHONY: test-doc-test
64+test-doc-test: $(DOC_TEST)
65+ $<
6166
6267.PHONY: upload-hackage
6368upload-hackage: sdist