mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-16 09:51:59 +03:00
f2931a4d32
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5735 Co-authored-by: Vamshi Surabhi <6562944+0x777@users.noreply.github.com> Co-authored-by: Alexis King <759911+lexi-lambda@users.noreply.github.com> Co-authored-by: Rakesh Emmadi <12475069+rakeshkky@users.noreply.github.com> Co-authored-by: Auke Booij <164426+abooij@users.noreply.github.com> Co-authored-by: Brandon Simmons <210815+jberryman@users.noreply.github.com> Co-authored-by: Lyndon Maydwell <92299+sordina@users.noreply.github.com> Co-authored-by: Anon Ray <616387+ecthiender@users.noreply.github.com> Co-authored-by: Evie Ciobanu <1017953+eviefp@users.noreply.github.com> Co-authored-by: Swann Moreau <62569634+evertedsphere@users.noreply.github.com> Co-authored-by: jkachmar <8461423+jkachmar@users.noreply.github.com> Co-authored-by: Robert <132113+robx@users.noreply.github.com> Co-authored-by: awjchen <13142944+awjchen@users.noreply.github.com> Co-authored-by: Karthikeyan Chinnakonda <15602904+codingkarthik@users.noreply.github.com> Co-authored-by: Tom Harding <6302310+i-am-tom@users.noreply.github.com> GitOrigin-RevId: 6a3940b2596fc178379b85d5fa79bd9ac83457e2
101 lines
1.6 KiB
Makefile
101 lines
1.6 KiB
Makefile
.PHONY: all
|
|
all:
|
|
|
|
# when running locally, use the postgres instance from the `docker-compose.yml`
|
|
# in this repo
|
|
DOCKER_POSTGRES_DATABASE_URL=postgresql://hasura:hasura@127.0.0.1:64001/hasura
|
|
|
|
.PHONY: ormolu
|
|
ormolu:
|
|
find src test bench -name '*.hs' | xargs ormolu -ie
|
|
|
|
.PHONY: format
|
|
format:
|
|
cabal-fmt -i pg-client.cabal
|
|
make ormolu
|
|
|
|
PROJECT ?= cabal.project
|
|
CABAL = cabal --project=$(PROJECT)
|
|
|
|
.PHONY: freeze
|
|
freeze:
|
|
$(CABAL) freeze \
|
|
--enable-tests \
|
|
--enable-benchmarks
|
|
|
|
.PHONY: configure
|
|
configure:
|
|
$(CABAL) configure \
|
|
--enable-tests \
|
|
--enable-benchmarks
|
|
|
|
.PHONY: update
|
|
update:
|
|
$(CABAL) update
|
|
|
|
.PHONY: build-deps
|
|
build-deps:
|
|
$(CABAL) build \
|
|
--only-dependencies \
|
|
--enable-tests \
|
|
--enable-benchmarks
|
|
|
|
.PHONY: build
|
|
build:
|
|
$(CABAL) build \
|
|
--enable-tests \
|
|
--enable-benchmarks \
|
|
pg-client
|
|
|
|
.PHONY: build-all
|
|
build-all:
|
|
$(CABAL) build \
|
|
--enable-tests \
|
|
--enable-benchmarks \
|
|
all
|
|
|
|
.PHONY: start-dbs
|
|
start-dbs:
|
|
docker-compose up -d
|
|
sleep 10
|
|
|
|
.PHONY: stop-dbs
|
|
stop-dbs:
|
|
docker-compose down -v
|
|
|
|
.PHONY: test-ci
|
|
test-ci:
|
|
$(CABAL) test \
|
|
--enable-tests \
|
|
--enable-benchmarks \
|
|
all
|
|
|
|
.PHONY: test-all
|
|
test-all: start-dbs
|
|
export DATABASE_URL=$(DOCKER_POSTGRES_DATABASE_URL) && \
|
|
$(CABAL) test \
|
|
--enable-tests \
|
|
--enable-benchmarks \
|
|
all
|
|
make stop-dbs
|
|
|
|
.PHONY: ghcid
|
|
ghcid:
|
|
ghcid --command "\
|
|
$(CABAL) repl \
|
|
--repl-option='-fobject-code' \
|
|
--repl-option='-O0' \
|
|
pg-client \
|
|
"
|
|
|
|
.PHONY: ghcid-test
|
|
ghcid-test:
|
|
ghcid \
|
|
--command "\
|
|
$(CABAL) repl \
|
|
--repl-option '-fobject-code' \
|
|
--repl-option '-O0' \
|
|
pg-client-test \
|
|
" \
|
|
--test ":main"
|