From 31d00b02fb5c207c323216c3fe203608c1ac825f Mon Sep 17 00:00:00 2001 From: ashulmanWeWork <41963174+ashulmanWeWork@users.noreply.github.com> Date: Tue, 19 Feb 2019 15:32:36 -0800 Subject: [PATCH] Add circle ci (#5) * Add circle_ci config * Add basic circleCI template * Add an integration-test target * Sample fix * Adding additional dependency in test-requirements * Add testing line * Add some install steps to install airflow for testing * Adjustments to install local airflow to run tests * Add additional necessary requirements * Add circle_ci fixes --- .circleci/config.yml | 57 +++++++++++++++++++++++++++++++++++++++++++ requirements.txt | 6 +++++ setup.py | 2 +- test-requirements.txt | 11 +++++++++ 4 files changed, 75 insertions(+), 1 deletion(-) create mode 100644 .circleci/config.yml create mode 100644 requirements.txt create mode 100644 test-requirements.txt diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 0000000000000..f12936072f4ff --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,57 @@ +version: 2 + +defaults: &defaults + docker: + - image: circleci/python:3.6 + working_directory: ~/marquez_airflow + + +jobs: + build: + <<: *defaults + steps: + - checkout + - run: pip install --user -r requirements.txt + + test: + <<: *defaults + steps: + - checkout + - run: pip install --user -r test-requirements.txt + - run: + name: Install airflow from package + environment: + SLUGIFY_USES_TEXT_UNIDECODE: 'yes' + command: pip install --user -e . + - run: python -m pytest ./test + + integration-test: + <<: *defaults + steps: + - checkout + - run: pip install --user -r test-requirements.txt + + release: + <<: *defaults + steps: + - checkout + - run: pip install --user twine + - run: python setup.py sdist + - run: python -m twine upload --verbose dist/* + +workflows: + version: 2 + marquez_airflow: + jobs: + - build + - test: + requires: + - build + - release: + requires: + - test + filters: + tags: + only: /^[0-9]+(\.[0-9]+){2}$/ + branches: + ignore: /.*/ diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000000000..4c8a2455ef06c --- /dev/null +++ b/requirements.txt @@ -0,0 +1,6 @@ +certifi >= 14.05.14 +six >= 1.10 +python_dateutil >= 2.5.3 +setuptools >= 21.0.0 +urllib3 >= 1.15.1 +marquez-python==0.1.4 \ No newline at end of file diff --git a/setup.py b/setup.py index d3cbced99bac5..3ecd6fea47b99 100644 --- a/setup.py +++ b/setup.py @@ -14,7 +14,7 @@ url="https://github.com/MarquezProject/marquez-airflow", packages=setuptools.find_packages(), install_requires = [ - "marquez-python>=1.2.1", + "marquez-python>=0.1.4", "apache-airflow>=1.9.0" ], ) diff --git a/test-requirements.txt b/test-requirements.txt new file mode 100644 index 0000000000000..6c10bcbf37781 --- /dev/null +++ b/test-requirements.txt @@ -0,0 +1,11 @@ +coverage>=4.0.3 +nose>=1.3.7 +pluggy>=0.3.1 +py>=1.4.31 +randomize>=0.13 +pytest +urllib3 +pytzdata +marquez-python==0.1.4 +apache-airflow==1.9.0 +pendulum \ No newline at end of file