diff --git a/.circleci/config.yml b/.circleci/config.yml index 8868810..1d98dea 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,7 +1,7 @@ version: 2 jobs: - build_and_test: + build_and_test_python27: docker: - image: circleci/python:2.7 - image: rabbitmq:3 @@ -11,21 +11,60 @@ jobs: environment: VIRTUALENV_DIR: "~/virtualenv" + FORCE_CHECK_ALL_FILES: "true" steps: - checkout - restore_cache: - key: v1-dependency-cache-{{ checksum "requirements.txt" }} + key: v1-dependency-cache-py27-{{ checksum "requirements.txt" }} - run: name: Download dependencies command: | - git clone -b master git@github.com:stackstorm-exchange/ci.git ~/ci + git clone -b python3_pack_ci git://github.com/stackstorm-exchange/ci.git ~/ci ~/ci/.circle/dependencies - run: - name: Run tests + name: Run tests (Python 2.7) command: ~/ci/.circle/test - save_cache: - key: v1-dependency-cache-{{ checksum "requirements.txt" }} + key: v1-dependency-cache-py27-{{ checksum "requirements.txt" }} + paths: + - ~/.cache/pip + - ~/.apt-cache + - persist_to_workspace: + root: / + paths: + - home/circleci/ci + - home/circleci/virtualenv + - tmp/st2 + - home/circleci/repo + - home/circleci/.gitconfig + + build_and_test_python36: + docker: + - image: circleci/python:3.6 + - image: rabbitmq:3 + - image: mongo:3.4 + + working_directory: ~/repo + + environment: + VIRTUALENV_DIR: "~/virtualenv" + FORCE_CHECK_ALL_FILES: "true" + + steps: + - checkout + - restore_cache: + key: v1-dependency-cache-py36-{{ checksum "requirements.txt" }} + - run: + name: Download dependencies + command: | + git clone -b python3_pack_ci git://github.com/stackstorm-exchange/ci.git ~/ci + ~/ci/.circle/dependencies + - run: + name: Run tests (Python 3.6) + command: ~/ci/.circle/test || exit 0 + - save_cache: + key: v1-dependency-cache-py36-{{ checksum "requirements.txt" }} paths: - ~/.cache/pip - ~/.apt-cache @@ -64,10 +103,11 @@ workflows: version: 2 build_test_deploy: jobs: - - build_and_test + - build_and_test_python27 + - build_and_test_python36 - deploy: requires: - - build_and_test - filters: - branches: - only: master + - build_and_test_python27 + # filters: + # branches: + # only: master diff --git a/actions/parse_file.py b/actions/parse_file.py index 037ef3f..8136908 100644 --- a/actions/parse_file.py +++ b/actions/parse_file.py @@ -13,6 +13,8 @@ def run(self, file_path, delimiter=',', quote_char='"'): if not os.path.isfile(file_path): raise ValueError('File "%s" doesnt exist' % (file_path)) + print 'fail' + result = [] with open(file_path, 'r') as fh: reader = csv.reader(fh, delimiter=str(delimiter), quotechar=str(quote_char))