forked from singer-io/tap-postgres
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
38 lines (28 loc) · 928 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
.PHONY: install lint test docker-test docker-lint docker-ci docker-shell docker-stop
install:
pip install -r requirements.txt
lint:
flake8
pylint tap_postgres || pylint-exit $$?
test:
nosetests -v
define DOCKER_RUN
docker build -t tap_postgres . && \
docker network create tap_postgres; \
docker run --network="tap_postgres" --name tap_postgres_db -e POSTGRES_PASSWORD=postgres -d postgres; \
docker run -it --rm --env-file .env-test --network="tap_postgres" --name tap_postgres
endef
docker-test:
$(DOCKER_RUN) tap_postgres make test
docker-lint:
$(DOCKER_RUN) tap_postgres make lint
docker-ci:
$(DOCKER_RUN) tap_postgres make lint test
make docker-stop
docker-shell:
$(DOCKER_RUN) --volume ${PWD}:/tap_postgres tap_postgres /bin/bash
docker-format:
$(DOCKER_RUN) --volume ${PWD}:/tap_postgres tap_postgres black tap_postgres tests
docker-stop:
docker rm -f tap_postgres_db
docker network rm tap_postgres