Skip to content

Commit 3663b57

Browse files
committed
Makefile to build wheel and run tests
1 parent 4e5e528 commit 3663b57

File tree

2 files changed

+43
-0
lines changed

2 files changed

+43
-0
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,3 +139,6 @@ doc/.docenv
139139
doc/build.gitbak
140140
.gitbak/
141141
.venvpy37
142+
.venv1.1.0
143+
.venv
144+
.bldenv

Makefile

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Configuration variables
2+
VERSION=1.0.3rc1
3+
PROJ_DIR?=$(shell pwd)
4+
VENV_DIR?=${PROJ_DIR}/.bldenv
5+
BUILD_DIR=${PROJ_DIR}/build
6+
DIST_DIR=${PROJ_DIR}/dist
7+
PYTHON_3=python3.8
8+
9+
10+
clean_venv:
11+
rm -fr ${VENV_DIR}
12+
13+
clean: clean_venv
14+
rm -fr ${DIST_DIR}
15+
rm -fr ${BUILD_DIR}
16+
17+
18+
wheel: clean
19+
${PYTHON_3} -m venv ${VENV_DIR}
20+
${VENV_DIR}/bin/pip install --upgrade wheel dataclasses build
21+
${VENV_DIR}/bin/python3 -m build
22+
23+
24+
# Target to test a dbt-oracle package from PyPI.
25+
adbs_pypi_test: clean_venv
26+
${PYTHON_3} -m venv ${VENV_DIR}
27+
${VENV_DIR}/bin/pip install dbt-oracle==${VERSION}
28+
cd dbt_adbs_test_project && ${VENV_DIR}/bin/dbt --version
29+
cd dbt_adbs_test_project && ${VENV_DIR}/bin/dbt debug --profiles-dir ./
30+
cd dbt_adbs_test_project && ${VENV_DIR}/bin/dbt run-operation drop_schema --args 'relation: ${DBT_ORACLE_SCHEMA}' --profiles-dir ./
31+
cd dbt_adbs_test_project && ${VENV_DIR}/bin/dbt deps --profiles-dir ./
32+
cd dbt_adbs_test_project && ${VENV_DIR}/bin/dbt seed --profiles-dir ./
33+
cd dbt_adbs_test_project && ${VENV_DIR}/bin/dbt run --profiles-dir ./
34+
cd dbt_adbs_test_project && ${VENV_DIR}/bin/dbt test --profiles-dir ./
35+
cd dbt_adbs_test_project && ${VENV_DIR}/bin/dbt test --profiles-dir ./
36+
cd dbt_adbs_test_project && ${VENV_DIR}/bin/dbt run --profiles-dir ./
37+
cd dbt_adbs_test_project && ${VENV_DIR}/bin/dbt snapshot --profiles-dir ./
38+
cd dbt_adbs_test_project && ${VENV_DIR}/bin/dbt snapshot --profiles-dir ./
39+
40+

0 commit comments

Comments
 (0)