separate linting from testing
version: 2
jobs:
- test-python-3:
+ check-codestyle:
docker:
- image: hungpham2511/toppra-dep:0.0.2
@@ -40,17 +40,60 @@ jobs:
python setup.py develop
- run:
- name: test
+ name: check codestyle
command: |
. venv3/bin/activate
- export PYTHONPATH=$PYTHONPATH:`openrave-config --python-dir`
- pytest tests -W ignore::PendingDeprecationWarning
+ make lint
+
+ - store_artifacts:
+ path: test-reports
+ destination: test-reports
+
+ test-python-3:
+ docker:
+ - image: hungpham2511/toppra-dep:0.0.2
+
+ working_directory: ~/repo
+
+ steps:
+ - checkout
+
+ # Download and cache dependencies
+ - restore_cache:
+ keys:
+ - v1-dependencies3-{{ checksum "requirements3.txt" }}
+ # fallback to using the latest cache if no exact match is found
+ - v1-dependencies3-
- run:
- name: lint
+ name: install dependencies
command: |
+ python3 -m venv venv3
. venv3/bin/activate
- make lint
+ # main deps
+ pip install -r requirements3.txt
+ git clone https://github.com/hungpham2511/qpOASES && cd qpOASES/ && mkdir bin && make && cd interfaces/python/ && python setup.py install
+ # test deps
+ pip install cvxpy cvxopt pytest pytest-cov pandas tabulate pylint pydocstyle pycodestyle
+
+ - save_cache:
+ paths:
+ - ./venv3
+ key: v1-dependencies3-{{ checksum "requirements3.txt" }}
+
+ # build install
+ - run:
+ name: build and install
+ command: |
+ . venv3/bin/activate
+ python setup.py develop
+
+ - run:
+ name: test
+ command: |
+ . venv3/bin/activate
+ export PYTHONPATH=$PYTHONPATH:`openrave-config --python-dir`
+ pytest tests -W ignore::PendingDeprecationWarning
- store_artifacts:
path: test-reports
@@ -102,13 +145,6 @@ jobs:
export PYTHONPATH=$PYTHONPATH:`openrave-config --python-dir`
pytest tests -W ignore::PendingDeprecationWarning
- - run:
- name: lint
- command: |
- . venv/bin/activate
- export PYTHONPATH=$PYTHONPATH:`openrave-config --python-dir`
- make lint
-
- store_artifacts:
path: test-reports
destination: test-reports
