From e3732fed935d863f6a62d5c941c16b4a8e818206 Mon Sep 17 00:00:00 2001 From: Mark Percival Date: Wed, 8 Jul 2020 13:31:49 -0400 Subject: [PATCH 1/9] Windows test ci --- .circleci/config.yml | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index a758852..73dfd52 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,6 +1,21 @@ -version: 2 +version: 2.1 + +orbs: + win: circleci/windows@2.2.0 + jobs: - build: + test_windows: + steps: + - checkout + - run: + name: Install python deps + command: pip install -r requirements/dev.txt + - run: + command: tox + - store_artifacts: + path: output + + test_linux: docker: - image: circleci/python:3.8 steps: @@ -22,4 +37,10 @@ jobs: . venv/bin/activate tox - store_artifacts: - path: output \ No newline at end of file + path: output + +workflows: + test: + jobs: + - test_linux + - test_windows \ No newline at end of file From ca9aa0e31942d8d01e5dd168522d545891cdeaee Mon Sep 17 00:00:00 2001 From: Mark Percival Date: Wed, 8 Jul 2020 13:47:32 -0400 Subject: [PATCH 2/9] Window support --- .circleci/config.yml | 37 +++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 73dfd52..9234d77 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -3,21 +3,18 @@ version: 2.1 orbs: win: circleci/windows@2.2.0 -jobs: - test_windows: - steps: - - checkout - - run: - name: Install python deps - command: pip install -r requirements/dev.txt - - run: - command: tox - - store_artifacts: - path: output - - test_linux: +executors: + linux: docker: - image: circleci/python:3.8 + + windows: + name: win/default + shell: powershell.exe + +commands: + tox: + description: "Build and test with tox" steps: - checkout - restore_cache: @@ -39,8 +36,12 @@ jobs: - store_artifacts: path: output -workflows: - test: - jobs: - - test_linux - - test_windows \ No newline at end of file +jobs: + build_windows: + executor: windows + steps: + - tox + build_linux: + executor: linux + steps: + - tox From 541e7d27abc09e9997a4e2859beef4f8fdafa857 Mon Sep 17 00:00:00 2001 From: Mark Percival Date: Wed, 8 Jul 2020 13:49:39 -0400 Subject: [PATCH 3/9] Fix yaml --- .circleci/config.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 9234d77..60ad6ff 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -7,10 +7,6 @@ executors: linux: docker: - image: circleci/python:3.8 - - windows: - name: win/default - shell: powershell.exe commands: tox: @@ -38,7 +34,7 @@ commands: jobs: build_windows: - executor: windows + executor: win/default steps: - tox build_linux: From 8f48fcc083c9187505d6c5df8fad4b749f46acac Mon Sep 17 00:00:00 2001 From: Mark Percival Date: Wed, 8 Jul 2020 13:51:18 -0400 Subject: [PATCH 4/9] Workflow --- .circleci/config.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 60ad6ff..e8f90d7 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -41,3 +41,10 @@ jobs: executor: linux steps: - tox + +workflows: + version: 2 + build_and_test: + jobs: + - build_linux + - build_windows \ No newline at end of file From 7099c1f8caa75a42583e0f79a477f35c970e278b Mon Sep 17 00:00:00 2001 From: Mark Percival Date: Wed, 8 Jul 2020 14:02:37 -0400 Subject: [PATCH 5/9] Conditional Windows --- .circleci/config.yml | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index e8f90d7..fa2ed54 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -11,10 +11,32 @@ executors: commands: tox: description: "Build and test with tox" + parameters: + windows: + default: false + type: boolean steps: - checkout - restore_cache: key: deps1-{{ .Branch }}-{{ checksum "requirements/dev.txt" }} + - when: + condition: << parameters.windows >> + steps: + - run: + name: Install Python deps in a venv + command: | + python3 -m venv venv + venv\Scripts\Activate.ps1 + pip install -r requirements/dev.txt + - unless: + condition: << parameters.windows >> + steps: + - run: + name: Install Python deps in a venv + command: | + python3 -m venv venv + . venv/bin/activate + pip install -r requirements/dev.txt - run: name: Install Python deps in a venv command: | @@ -36,11 +58,13 @@ jobs: build_windows: executor: win/default steps: - - tox + - tox: + windows: true build_linux: executor: linux steps: - - tox + - tox: + windows: false workflows: version: 2 From 61db6d398da83db8692d7d3bc3a374f5abac82eb Mon Sep 17 00:00:00 2001 From: Mark Percival Date: Wed, 8 Jul 2020 14:04:54 -0400 Subject: [PATCH 6/9] Yaml fix --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index fa2ed54..f60097b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -59,12 +59,12 @@ jobs: executor: win/default steps: - tox: - windows: true + windows: true build_linux: executor: linux steps: - tox: - windows: false + windows: false workflows: version: 2 From 00766d34327a1d4cea816b2f705333e416a78874 Mon Sep 17 00:00:00 2001 From: Mark Percival Date: Wed, 8 Jul 2020 14:10:02 -0400 Subject: [PATCH 7/9] Just go back to seperate runners --- .circleci/config.yml | 62 +++++++++++++++++++------------------------- 1 file changed, 26 insertions(+), 36 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index f60097b..c117d7a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -8,40 +8,18 @@ executors: docker: - image: circleci/python:3.8 -commands: - tox: - description: "Build and test with tox" - parameters: - windows: - default: false - type: boolean +jobs: + build_windows: + executor: win/default steps: - checkout - restore_cache: key: deps1-{{ .Branch }}-{{ checksum "requirements/dev.txt" }} - - when: - condition: << parameters.windows >> - steps: - - run: - name: Install Python deps in a venv - command: | - python3 -m venv venv - venv\Scripts\Activate.ps1 - pip install -r requirements/dev.txt - - unless: - condition: << parameters.windows >> - steps: - - run: - name: Install Python deps in a venv - command: | - python3 -m venv venv - . venv/bin/activate - pip install -r requirements/dev.txt - run: name: Install Python deps in a venv command: | - python3 -m venv venv - . venv/bin/activate + python -m venv venv + venv\Scripts\Activate.ps1 pip install -r requirements/dev.txt - save_cache: key: deps1-{{ .Branch }}-{{ checksum "requirements/dev.txt" }} @@ -49,22 +27,34 @@ commands: - "venv" - run: command: | - . venv/bin/activate + venv\Scripts\Activate.ps1 tox - store_artifacts: path: output -jobs: - build_windows: - executor: win/default - steps: - - tox: - windows: true build_linux: executor: linux steps: - - tox: - windows: false + - checkout + - restore_cache: + key: deps1-{{ .Branch }}-{{ checksum "requirements/dev.txt" }} + - run: + name: Install Python deps in a venv + command: | + python3 -m venv venv + . venv/bin/activate + pip install -r requirements/dev.txt + - save_cache: + key: deps1-{{ .Branch }}-{{ checksum "requirements/dev.txt" }} + paths: + - "venv" + - run: + command: | + . venv/bin/activate + tox + - store_artifacts: + path: output + workflows: version: 2 From 5b0544c48edb61d4a3dd7cac26e4626108b010c9 Mon Sep 17 00:00:00 2001 From: Mark Percival Date: Wed, 8 Jul 2020 14:16:00 -0400 Subject: [PATCH 8/9] Simplify, no venv in windows --- .circleci/config.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index c117d7a..f343c72 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -18,8 +18,6 @@ jobs: - run: name: Install Python deps in a venv command: | - python -m venv venv - venv\Scripts\Activate.ps1 pip install -r requirements/dev.txt - save_cache: key: deps1-{{ .Branch }}-{{ checksum "requirements/dev.txt" }} @@ -27,7 +25,6 @@ jobs: - "venv" - run: command: | - venv\Scripts\Activate.ps1 tox - store_artifacts: path: output @@ -41,7 +38,7 @@ jobs: - run: name: Install Python deps in a venv command: | - python3 -m venv venv + python3 -m venv venv: . venv/bin/activate pip install -r requirements/dev.txt - save_cache: From ac8d4825a186c1f70fa1f5ed64fa2e8115c9a7bd Mon Sep 17 00:00:00 2001 From: Mark Percival Date: Wed, 8 Jul 2020 14:24:02 -0400 Subject: [PATCH 9/9] Python 3.7.3 for Window CircleCI --- .python-version | 1 + tox.ini | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 .python-version diff --git a/.python-version b/.python-version new file mode 100644 index 0000000..c1e43e6 --- /dev/null +++ b/.python-version @@ -0,0 +1 @@ +3.7.3 diff --git a/tox.ini b/tox.ini index 8844ae3..d24eb22 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,6 @@ # content of: tox.ini , put in same dir as setup.py [tox] -envlist = py38 +envlist = py37 [testenv] # install testing framework # ... or install anything else you might need here