123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125 |
- # Python CircleCI 2.0 configuration file
- #
- # Check https://circleci.com/docs/2.0/language-python/ for more details
- #
- version: 2
- workflows:
- version: 2
- test:
- jobs:
- - test-3.6
- - test-2.7
- jobs:
- test-3.6:
- docker:
- - image: circleci/python:3.6.1
- environment:
- - NEO_TEST_FILE_DIR: "/home/circleci/repo/files_for_testing_neo"
- working_directory: ~/repo
- steps:
- - checkout
- # Download and cache dependencies
- - restore_cache:
- keys:
- - v1-dependencies-{{ checksum "requirements.txt" }}
- # fallback to using the latest cache if no exact match is found
- - v1-dependencies-
- - restore-cache:
- keys:
- - test-files-f7905c85d1
- - run:
- name: install dependencies
- command: |
- python3 -m venv venv
- . venv/bin/activate
- pip install -r requirements.txt
- pip install -r .circleci/requirements_testing.txt
- pip install .
- - save_cache:
- paths:
- - ./venv
- key: v1-dependencies-{{ checksum "requirements.txt" }}
- - save_cache:
- paths:
- - ./files_for_testing_neo
- key: test-files-f7905c85d1
- # run tests!
- - run:
- name: run tests
- command: |
- . venv/bin/activate
- nosetests -v --with-coverage --cover-package=neo
- - run:
- name: coveralls
- command: |
- . venv/bin/activate
- coveralls || true # a coveralls failure shouldn't cause a build failure
- - store_artifacts:
- path: test-reports
- destination: test-reports
- test-2.7:
- docker:
- - image: circleci/python:2.7-stretch
-
- environment:
- - NEO_TEST_FILE_DIR: "/home/circleci/repo/files_for_testing_neo"
- working_directory: ~/repo
- steps:
- - checkout
- # Download and cache dependencies
- - restore_cache:
- keys:
- - v1-py2-dependencies-{{ checksum "requirements.txt" }}
- # fallback to using the latest cache if no exact match is found
- - v1-py2-dependencies-
- - restore-cache:
- keys:
- - test-files-f7905c85d1
- - run:
- name: install dependencies
- command: |
- virtualenv venv2
- . venv2/bin/activate
- pip install -r requirements.txt
- pip install -r .circleci/requirements_testing.txt
- pip install mock # only needed for Python 2
- pip install .
- - save_cache:
- paths:
- - ./venv2
- key: v1-py2-dependencies-{{ checksum "requirements.txt" }}
- - save_cache:
- paths:
- - ./files_for_testing_neo
- key: test-files-f7905c85d1
- # run tests!
- - run:
- name: run tests
- command: |
- . venv2/bin/activate
- nosetests -v --with-coverage --cover-package=neo
- - store_artifacts:
- path: test-reports
- destination: test-reports
-
|