forked from dbt-labs/dbt-snowflake
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
48 lines (39 loc) · 1.35 KB
/
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
39
40
41
42
43
44
45
46
47
48
.DEFAULT_GOAL:=help
.PHONY: dev
dev: ## Installs adapter in develop mode along with development dependencies
@\
pip install -e . -r dev-requirements.txt && pre-commit install
.PHONY: dev-uninstall
dev-uninstall: ## Uninstalls all packages while maintaining the virtual environment
## Useful when updating versions, or if you accidentally installed into the system interpreter
pip freeze | grep -v "^-e" | cut -d "@" -f1 | xargs pip uninstall -y
pip uninstall -y dbt-snowflake
.PHONY: unit
unit: ## Runs unit tests with py39.
@\
tox -e py39
.PHONY: test
test: ## Runs unit tests with py39 and code checks against staged changes.
@\
tox -p -e py39; \
pre-commit run --all-files
.PHONY: integration
integration: ## Runs snowflake integration tests with py38.
@\
tox -e py39-snowflake --
.PHONY: clean
@echo "cleaning repo"
@git clean -f -X
.PHONY: help
help: ## Show this help message.
@echo 'usage: make [target]'
@echo
@echo 'targets:'
@grep -E '^[7+a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
.PHONY: docker-dev
docker-dev:
docker build -f docker/dev.Dockerfile -t dbt-snowflake-dev .
docker run --rm -it --name dbt-snowflake-dev -v $(shell pwd):/opt/code dbt-snowflake-dev
.PHONY: docker-prod
docker-prod:
docker build -f docker/Dockerfile -t dbt-snowflake .