mirror of
https://github.com/typeable/bloodhound.git
synced 2024-12-25 07:43:24 +03:00
107 lines
3.1 KiB
Makefile
107 lines
3.1 KiB
Makefile
stack = STACK_YAML='stack.yaml' stack
|
|
|
|
build:
|
|
stack build
|
|
|
|
build-validate:
|
|
stack build --fast --ghc-options '-Wall -Werror'
|
|
|
|
ghci:
|
|
stack ghci
|
|
|
|
test: echo-warn
|
|
stack test
|
|
|
|
test-rerun: echo-warn
|
|
stack test --test-arguments "-r"
|
|
|
|
test-ghci:
|
|
stack ghci bloodhound:test:bloodhound-tests
|
|
|
|
ghcid:
|
|
ghcid -c "$(stack) ghci bloodhound:lib --test --ghci-options='-fobject-code -fno-warn-unused-do-bind' --main-is bloodhound:test:bloodhound-tests"
|
|
|
|
ghcid-validate:
|
|
ghcid -c "$(stack) ghci bloodhound:lib --test --ghci-options='-Werror -fobject-code -fno-warn-unused-do-bind' --main-is bloodhound:test:bloodhound-tests"
|
|
|
|
weeder:
|
|
weeder . --build
|
|
|
|
# hlint --default > .hlint.yaml
|
|
hlint:
|
|
hlint .
|
|
|
|
hlint-watch:
|
|
sos src/ -c "hlint ." -p "src/(.*)\.hs"
|
|
|
|
mod-build:
|
|
stack build --ghc-options '+RTS -A128M -RTS'
|
|
|
|
echo-warn:
|
|
@echo "Make certain you have an elasticsearch instance on localhost:9200 !"
|
|
|
|
7.8-build:
|
|
STACK_YAML="stack-7.8.yaml" stack build
|
|
|
|
7.8-test: echo-warn
|
|
STACK_YAML="stack-7.8.yaml" stack test
|
|
|
|
7.10-build:
|
|
STACK_YAML="stack-7.10.yaml" stack build
|
|
|
|
7.10-test: echo-warn
|
|
STACK_YAML="stack-7.10.yaml" stack test
|
|
|
|
7.10-test-ES1:
|
|
STACK_YAML="stack-7.10.yaml" stack test --fast bloodhound:test:bloodhound-tests --test-arguments="--qc-max-success 500" --flag bloodhound:ES1
|
|
|
|
7.10-test-ES5:
|
|
STACK_YAML="stack-7.10.yaml" stack test --fast bloodhound:test:bloodhound-tests --test-arguments="--qc-max-success 500" --flag bloodhound:ES5
|
|
|
|
8.0-test-ES1:
|
|
STACK_YAML="stack-8.0.yaml" stack test --fast bloodhound:test:bloodhound-tests --test-arguments="--qc-max-success 500" --flag bloodhound:ES1
|
|
|
|
8.0-test-ES5:
|
|
STACK_YAML="stack-8.0.yaml" stack test --fast bloodhound:test:bloodhound-tests --test-arguments="--qc-max-success 500" --flag bloodhound:ES5
|
|
|
|
8.2-test-ES1:
|
|
STACK_YAML="stack.yaml" stack test --fast bloodhound:test:bloodhound-tests --test-arguments="--qc-max-success 500" --flag bloodhound:ES1
|
|
|
|
8.2-test-ES5:
|
|
STACK_YAML="stack.yaml" stack test --fast bloodhound:test:bloodhound-tests --test-arguments="--qc-max-success 500" --flag bloodhound:ES5
|
|
|
|
8.0-build:
|
|
STACK_YAML="stack-8.0.yaml" stack build
|
|
|
|
8.2-build:
|
|
STACK_YAML="stack-8.2.yaml" stack build
|
|
|
|
module-touch:
|
|
touch src/Database/V1/Bloodhound/Types.hs
|
|
touch src/Database/V5/Bloodhound/Types.hs
|
|
|
|
upload:
|
|
stack upload --no-signature .
|
|
|
|
# Create ES5 instance
|
|
|
|
## Run test environment
|
|
compose-ES5:
|
|
@LOCAL_USER_ID=${LOCAL_USER_ID} docker-compose -f tests/ES5/docker-compose.yml --project-directory tests/ES5/ up
|
|
|
|
## Run test environment in detach mode
|
|
compose-ES5-detach-up:
|
|
@LOCAL_USER_ID=${LOCAL_USER_ID} docker-compose -f tests/ES5/docker-compose.yml --project-directory tests/ES5/ up -d
|
|
|
|
## Close test environment if run on detach mode
|
|
compose-ES5-detach-down:
|
|
@LOCAL_USER_ID=${LOCAL_USER_ID} docker-compose -f tests/ES5/docker-compose.yml --project-directory tests/ES5/ down
|
|
|
|
## build the docker compose images
|
|
compose-build:
|
|
@LOCAL_USER_ID=${LOCAL_USER_ID} docker-compose -f tests/ES5/docker-compose.yml --project-directory tests/ES5/ build
|
|
|
|
## Spawn bash shell in ES5 test container
|
|
ES5-shell:
|
|
@LOCAL_USER_ID=${LOCAL_USER_ID} docker-compose -f tests/ES5/docker-compose.yml --project-directory tests/ES5/ exec elasticsearch1 bash
|