Skip to content

Commit

Permalink
Test featuretools on CI using packaged source files (#459)
Browse files Browse the repository at this point in the history
Test featuretools on CI using packaged source files
  • Loading branch information
rwedge committed Mar 15, 2019
1 parent a86b6d8 commit 6feaf93
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 34 deletions.
97 changes: 64 additions & 33 deletions .circleci/config.yml
@@ -1,62 +1,93 @@
version: 2
version: 2.1

commands:
install-packaged-featuretools:
description: "install featuretools from source distribution"
steps:
- run : |
source test_env/bin/activate
python setup.py sdist
FEATURETOOLS_VERSION=$(python setup.py --version)
tar -zxvf "dist/featuretools-${FEATURETOOLS_VERSION}.tar.gz"
pip install -e "featuretools-${FEATURETOOLS_VERSION}/"
pip install -r "featuretools-${FEATURETOOLS_VERSION}/test-requirements.txt"
run-packaged-tests:
description: "run unit tests on packaged testing files"
steps:
- run: |
source test_env/bin/activate
cd "featuretools-$(python setup.py --version)/"
pytest
jobs:
"python-2.7":
"python-27":
working_directory: ~/featuretools
docker:
- image: circleci/python:2.7
- image: circleci/python:2.7
steps:
- run: sudo apt update && sudo apt install -y graphviz
- checkout
- run: virtualenv venv
- run: source venv/bin/activate && make installdeps
- run: source venv/bin/activate && make lint
- run: source venv/bin/activate && make test
- run: virtualenv test_env && virtualenv dev_env
- install-packaged-featuretools
- run: source dev_env/bin/activate && make installdeps
- run: source dev_env/bin/activate && make lint
- run-packaged-tests

"python-3.5":
"python-35":
working_directory: ~/featuretools
docker:
- image: circleci/python:3.5
- image: circleci/python:3.5
steps:
- run: sudo apt update && sudo apt install -y graphviz
- checkout
- run: virtualenv venv
- run: source venv/bin/activate && make installdeps
- run: source venv/bin/activate && make lint
- run: source venv/bin/activate && make test
- run: virtualenv test_env && virtualenv dev_env
- install-packaged-featuretools
- run: source dev_env/bin/activate && make installdeps
- run: source dev_env/bin/activate && make lint
- run-packaged-tests

"python-3.6":
"python-36":
working_directory: ~/featuretools
docker:
- image: circleci/python:3.6
- image: circleci/python:3.6
steps:
- run: sudo apt update && sudo apt install -y graphviz pandoc
- checkout
- run: virtualenv venv
- run: source venv/bin/activate && make installdeps
- run: source venv/bin/activate && make lint
- run: source venv/bin/activate && make -C docs/ -e "SPHINXOPTS=-W" clean html
- run: |
source venv/bin/activate
coverage erase
make testcoverage && codecov
- run: virtualenv test_env && virtualenv dev_env
- install-packaged-featuretools
- run: source dev_env/bin/activate && make installdeps
- run: source dev_env/bin/activate && make lint
- run-packaged-tests
- run: source dev_env/bin/activate && make -C docs/ -e "SPHINXOPTS=-W" clean html

"python-3.7":
"python-37":
working_directory: ~/featuretools
docker:
- image: circleci/python:3.7
- image: circleci/python:3.7
steps:
- run: sudo apt update && sudo apt install -y graphviz
- checkout
- run: virtualenv venv
- run: source venv/bin/activate && make installdeps
- run: source venv/bin/activate && make lint
- run: source venv/bin/activate && make test
- run: virtualenv test_env && virtualenv dev_env
- install-packaged-featuretools
- run: source dev_env/bin/activate && make installdeps
- run: source dev_env/bin/activate && make lint
- run: |
source test_env/bin/activate
pip install "$(cat dev-requirements.txt | grep codecov)"
coverage erase
FEATURETOOLS_VERSION=$(python setup.py --version)
cd "featuretools-${FEATURETOOLS_VERSION}/"
coverage erase
pytest featuretools/tests --cov=featuretools --cov-config=../.coveragerc
cd ../
cp "featuretools-${FEATURETOOLS_VERSION}/.coverage" .coverage
codecov
workflows:
version: 2
test_all_python_versions:
jobs:
- "python-2.7"
- "python-3.5"
- "python-3.6"
- "python-3.7"
- "python-27"
- "python-35"
- "python-36"
- "python-37"
1 change: 0 additions & 1 deletion test-requirements.txt
Expand Up @@ -3,7 +3,6 @@ mock==2.0.0
pympler==0.5
pytest-xdist==1.26.1
pytest-cov==2.6.1
llvmlite==0.27.0
fastparquet>=0.1.6
graphviz>=0.8.4
s3fs>=0.1.5

0 comments on commit 6feaf93

Please sign in to comment.