Nixify CircleCI setup (#1535)
* package ghr * add nix-based release scripts * refactor CI based on nix tests and release scripts * update stack version in circleci * update makefile * remove docker directory * add Docker Hub description * add README on docker
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
.PHONY: commit-check check clean lint style test test-watch coverage circleci circleci-prof-test check-dburi prompt-clean prompt-long-process
|
||||
.PHONY: commit-check check clean lint style test test-watch coverage circleci circleci-memory prompt-clean prompt-long-process cachix-push-all
|
||||
|
||||
commit-check: lint style
|
||||
|
||||
@@ -10,32 +10,34 @@ clean: prompt-clean
|
||||
# For running these you'll need to install hlint and stylish-haskell first. Run:
|
||||
# stack install hlint stylish-haskell
|
||||
lint:
|
||||
git ls-files | grep '\.l\?hs$$' | xargs stack exec -- hlint -X QuasiQuotes -X NoPatternSynonyms "$$@"
|
||||
git ls-files | grep '\.l\?hs$$' | \
|
||||
xargs stack exec -- hlint -X QuasiQuotes -X NoPatternSynonyms "$$@"
|
||||
|
||||
style:
|
||||
git ls-files | grep '\.l\?hs$$' | xargs stack exec -- stylish-haskell -i && git diff-index --exit-code HEAD -- '*.hs' '*.lhs'
|
||||
git ls-files | grep '\.l\?hs$$' | xargs stack exec -- stylish-haskell -i
|
||||
|
||||
test: check-dburi
|
||||
stack test
|
||||
test:
|
||||
test/with_tmp_db stack test
|
||||
|
||||
test-watch: check-dburi
|
||||
stack build --file-watch --test --test-arguments '--rerun --failure-report=.TESTREPORT --rerun-all-on-success'
|
||||
test-watch:
|
||||
test/with_tmp_db stack build --file-watch --test \
|
||||
--test-arguments '--rerun --failure-report=.TESTREPORT --rerun-all-on-success'
|
||||
|
||||
coverage: check-dburi clean
|
||||
coverage: clean
|
||||
stack build --coverage
|
||||
stack test --coverage
|
||||
test/with_tmp_db stack test --coverage
|
||||
|
||||
circleci: prompt-long-process
|
||||
circleci local execute --job build-test-9.4
|
||||
circleci local execute --job stack-test
|
||||
|
||||
circleci-prof-test: prompt-long-process
|
||||
circleci local execute --job build-prof-test
|
||||
|
||||
check-dburi:
|
||||
test -n "$(POSTGREST_TEST_CONNECTION)" # Requires POSTGREST_TEST_CONNECTION environmental variable
|
||||
circleci-memory: prompt-long-process
|
||||
circleci local execute --job stack-test-memory
|
||||
|
||||
prompt-clean:
|
||||
@echo -n 'Are you sure? You will have to rebuild. [y/N] ' && read ans && [ $${ans:-N} = y ]
|
||||
|
||||
prompt-long-process:
|
||||
@echo -n 'Are you sure? This might take a while. [y/N] ' && read ans && [ $${ans:-N} = y ]
|
||||
|
||||
cachix-push-all:
|
||||
nix-store -qR --include-outputs $$(nix-instantiate) | cachix push postgrest
|
||||
|
||||
Reference in New Issue
Block a user