forked from z3z1ma/dbt-core-interface
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
129 lines (107 loc) · 4.42 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
# Makes it easy to create virtual environments for different versions of dbt
ADAPTERS = sqlite duckdb
everything: .venv-dbt10/bin/python .venv-dbt11/bin/python .venv-dbt12/bin/python .venv-dbt13/bin/python .venv-dbt14/bin/python \
.venv-dbt15/bin/python .venv-dbt16/bin/python .venv-dbt17/bin/python .venv-dbt18/bin/python
.PHONY: everything
.venv-dbt10/bin/python:
python -m venv .venv-dbt10
.venv-dbt10/bin/pip install --upgrade wheel setuptools pip
.venv-dbt10/bin/pip install pytest WebTest .
for adapter in $(ADAPTERS); do \
.venv-dbt10/bin/pip install "dbt-$$adapter>=1.0.0,<1.1.0" "dbt-core>=1.0,<1.1.0" pytz; \
done
.venv-dbt11/bin/python:
python -m venv .venv-dbt11
.venv-dbt11/bin/pip install --upgrade wheel setuptools pip
.venv-dbt11/bin/pip install pytest WebTest .
for adapter in $(ADAPTERS); do \
.venv-dbt11/bin/pip install "dbt-$$adapter>=1.1.0,<1.2.0" "dbt-core>=1.1.0,<1.2.0"; \
done
.venv-dbt12/bin/python:
python -m venv .venv-dbt12
.venv-dbt12/bin/pip install --upgrade wheel setuptools pip
.venv-dbt12/bin/pip install pytest WebTest .
for adapter in $(ADAPTERS); do \
.venv-dbt12/bin/pip install "dbt-$$adapter>=1.2.0,<1.3.0" "dbt-core>=1.2.0,<1.3.0"; \
done
.venv-dbt13/bin/python:
python -m venv .venv-dbt13
.venv-dbt13/bin/pip install --upgrade wheel setuptools pip
.venv-dbt13/bin/pip install pytest WebTest .
for adapter in $(ADAPTERS); do \
.venv-dbt13/bin/pip install "dbt-$$adapter>=1.3.0,<1.4.0" "dbt-core>=1.3.0,<1.4.0"; \
done
.venv-dbt14/bin/python:
python -m venv .venv-dbt14
.venv-dbt14/bin/pip install --upgrade wheel setuptools pip
.venv-dbt14/bin/pip install pytest WebTest .
for adapter in $(ADAPTERS); do \
.venv-dbt14/bin/pip install "dbt-$$adapter>=1.4.0,<1.5.0" "dbt-core>=1.4.0,<1.5.0"; \
done
# Relaxed constraint to allow testing dbt-core 1.5.0 with sqlite
.venv-dbt15/bin/python:
python -m venv .venv-dbt15
.venv-dbt15/bin/pip install --upgrade wheel setuptools pip
.venv-dbt15/bin/pip install pytest WebTest .
for adapter in $(ADAPTERS); do \
.venv-dbt15/bin/pip install "dbt-$$adapter>=1.4.0,<1.6.0" "dbt-core>=1.5.0,<1.6.0"; \
done
.venv-dbt16/bin/python:
python -m venv .venv-dbt16
.venv-dbt16/bin/pip install --upgrade wheel setuptools pip
.venv-dbt16/bin/pip install pytest WebTest .
for adapter in $(ADAPTERS); do \
.venv-dbt16/bin/pip install "dbt-$$adapter>=1.4.0,<1.7.0"; \
.venv-dbt16/bin/pip install "dbt-core>=1.6.0,<1.7.0"; \
done
.venv-dbt17/bin/python:
python -m venv .venv-dbt17
.venv-dbt17/bin/pip install --upgrade wheel setuptools pip
.venv-dbt17/bin/pip install pytest WebTest .
for adapter in $(ADAPTERS); do \
.venv-dbt17/bin/pip install "dbt-$$adapter>=1.4.0,<1.8.0"; \
.venv-dbt17/bin/pip install "dbt-core>=1.7.0,<1.8.0"; \
done
# SQLITE adapter is not supported in dbt 1.8+ yet: https://github.com/codeforkjeff/dbt-sqlite/issues
ADAPTERS = duckdb
.venv-dbt18/bin/python:
python -m venv .venv-dbt18
.venv-dbt18/bin/pip install --upgrade wheel setuptools pip
.venv-dbt18/bin/pip install pytest WebTest .
for adapter in $(ADAPTERS); do \
.venv-dbt18/bin/pip install "dbt-core>=1.8.0,<1.9.0"; \
.venv-dbt18/bin/pip install "dbt-$$adapter"; \
done
.venv-dbt18/bin/pip install --force-reinstall dbt-adapters dbt-common;
clean:
rm -rf .venv-dbt10 .venv-dbt11 .venv-dbt12 .venv-dbt13 .venv-dbt14 .venv-dbt15 .venv-dbt16 .venv-dbt17 .venv-dbt18
.PHONY: clean
test-dbt1.0: .venv-dbt10/bin/python
.venv-dbt10/bin/python -m pytest tests/test_main.py
.PHONY: test-dbt1.0
test-dbt1.1: .venv-dbt11/bin/python
.venv-dbt11/bin/python -m pytest tests/test_main.py
.PHONY: test-dbt1.1
test-dbt1.2: .venv-dbt12/bin/python
.venv-dbt12/bin/python -m pytest tests/test_main.py
.PHONY: test-dbt1.2
test-dbt1.3: .venv-dbt13/bin/python
.venv-dbt13/bin/python -m pytest tests/test_main.py
.PHONY: test-dbt1.3
test-dbt1.4: .venv-dbt14/bin/python
.venv-dbt14/bin/python -m pytest tests/test_main.py
.PHONY: test-dbt1.4
test-dbt1.5: .venv-dbt15/bin/python
.venv-dbt15/bin/python -m pytest tests/test_main.py
.PHONY: test-dbt1.5
test-dbt1.6: .venv-dbt16/bin/python
.venv-dbt16/bin/python -m pytest tests/test_main.py
.PHONY: test-dbt1.6
test-dbt1.7: .venv-dbt17/bin/python
.venv-dbt17/bin/python -m pytest tests/test_main.py
.PHONY: test-dbt1.7
test-dbt1.8: .venv-dbt18/bin/python
.venv-dbt18/bin/python -m pytest tests/test_main.py
.PHONY: test-dbt1.8
test: test-dbt1.0 test-dbt1.1 test-dbt1.2 test-dbt1.3 test-dbt1.4 test-dbt1.5 test-dbt1.6 test-dbt1.7 test-dbt1.8
.PHONY: test