From b218402882a4009f772f4589432a1d954af4c047 Mon Sep 17 00:00:00 2001 From: Tomaz Muraus Date: Thu, 13 Dec 2018 20:57:35 +0100 Subject: [PATCH 1/5] Add new test circle ci config. --- .circleci/config.yml | 56 ++++++++++++++++++++++++++++++++++++-------- 1 file changed, 46 insertions(+), 10 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 8868810..e066ea6 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 @@ -15,17 +15,54 @@ jobs: 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 master 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" + + steps: + - checkout + - restore_cache: + key: v1-dependency-cache-py36-{{ checksum "requirements.txt" }} + - run: + name: Download dependencies + command: | + git clone -b master git://github.com/stackstorm-exchange/ci.git ~/ci + ~/ci/.circle/dependencies + - run: + name: Run tests (Python 2.7) + command: ~/ci/.circle/test + - save_cache: + key: v1-dependency-cache-py36-{{ checksum "requirements.txt" }} paths: - ~/.cache/pip - ~/.apt-cache @@ -38,6 +75,7 @@ jobs: - home/circleci/repo - home/circleci/.gitconfig + deploy: docker: - image: circleci/python:2.7 @@ -64,10 +102,8 @@ 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 From 0a3ebaf746557042fdd072c6d37b03bb780bf483 Mon Sep 17 00:00:00 2001 From: Tomaz Muraus Date: Thu, 13 Dec 2018 21:01:54 +0100 Subject: [PATCH 2/5] Update config. --- .circleci/config.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index e066ea6..1b75ed0 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -11,6 +11,7 @@ jobs: environment: VIRTUALENV_DIR: "~/virtualenv" + FORCE_CHECK_ALL_FILES: "true" steps: - checkout @@ -48,6 +49,7 @@ jobs: environment: VIRTUALENV_DIR: "~/virtualenv" + FORCE_CHECK_ALL_FILES: "true" steps: - checkout @@ -59,7 +61,7 @@ jobs: git clone -b master git://github.com/stackstorm-exchange/ci.git ~/ci ~/ci/.circle/dependencies - run: - name: Run tests (Python 2.7) + name: Run tests (Python 3.6) command: ~/ci/.circle/test - save_cache: key: v1-dependency-cache-py36-{{ checksum "requirements.txt" }} @@ -75,7 +77,6 @@ jobs: - home/circleci/repo - home/circleci/.gitconfig - deploy: docker: - image: circleci/python:2.7 @@ -107,3 +108,6 @@ workflows: - deploy: requires: - build_and_test_python27 + # filters: + # branches: + # only: master From 098c427ad3d483f6de88fe25530ef2f23df5ad37 Mon Sep 17 00:00:00 2001 From: Tomaz Muraus Date: Thu, 13 Dec 2018 21:03:17 +0100 Subject: [PATCH 3/5] Use testing branch. --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 1b75ed0..1aaba2a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -20,7 +20,7 @@ jobs: - 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 (Python 2.7) @@ -58,7 +58,7 @@ jobs: - 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 (Python 3.6) From c30e17ba0ee24e1ce6b7324b9a717889d9402d9e Mon Sep 17 00:00:00 2001 From: Tomaz Muraus Date: Thu, 13 Dec 2018 21:19:32 +0100 Subject: [PATCH 4/5] Test python 3 compfile failure. --- actions/parse_file.py | 2 ++ 1 file changed, 2 insertions(+) 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)) From d346caa2f316ecb14427a69753fa3ca69a9eda01 Mon Sep 17 00:00:00 2001 From: Tomaz Muraus Date: Fri, 14 Dec 2018 11:16:37 +0100 Subject: [PATCH 5/5] Python 3 failures should not be fatal. --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 1aaba2a..1d98dea 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -62,7 +62,7 @@ jobs: ~/ci/.circle/dependencies - run: name: Run tests (Python 3.6) - command: ~/ci/.circle/test + command: ~/ci/.circle/test || exit 0 - save_cache: key: v1-dependency-cache-py36-{{ checksum "requirements.txt" }} paths: