|
1 | 1 | version: 2.1
|
2 | 2 |
|
3 | 3 | executors:
|
4 |
| - python38: |
| 4 | + py38: |
5 | 5 | docker:
|
6 | 6 | - image: circleci/python:3.8
|
| 7 | + py37: |
| 8 | + docker: |
| 9 | + - image: circleci/python:3.7 |
| 10 | + py36: |
| 11 | + docker: |
| 12 | + - image: circleci/python:3.6 |
| 13 | + py35: |
| 14 | + docker: |
| 15 | + - image: circleci/python:3.5 |
| 16 | + py34: |
| 17 | + docker: |
| 18 | + - image: circleci/python:3.4 |
| 19 | + pypy3: |
| 20 | + docker: |
| 21 | + - image: pypy:3 |
7 | 22 |
|
8 | 23 | commands:
|
9 | 24 | setup_tox:
|
@@ -31,27 +46,100 @@ commands:
|
31 | 46 | paths:
|
32 | 47 | - ".tox"
|
33 | 48 |
|
| 49 | + run_tox_scenario: |
| 50 | + description: "Run scripts/run-tox-scenario with setup, caching and persistence" |
| 51 | + parameters: |
| 52 | + pattern: |
| 53 | + type: string |
| 54 | + steps: |
| 55 | + - checkout |
| 56 | + - setup_tox |
| 57 | + - restore_tox_cache |
| 58 | + - run: |
| 59 | + name: "Run scripts/run-tox-scenario" |
| 60 | + command: tox -f '<< parameters.pattern >>' |
| 61 | + - save_tox_cache |
| 62 | + |
34 | 63 | jobs:
|
35 | 64 | docs:
|
36 |
| - executor: python38 |
| 65 | + executor: py38 |
37 | 66 | steps:
|
38 | 67 | - checkout
|
39 | 68 | - setup_tox
|
40 | 69 | - restore_tox_cache
|
41 | 70 | - run: tox -e docs
|
42 | 71 | - save_tox_cache
|
43 | 72 |
|
| 73 | + docker-tests: |
| 74 | + machine: |
| 75 | + image: ubuntu-1604:201903-01 |
| 76 | + steps: |
| 77 | + - checkout |
| 78 | + - run: |
| 79 | + name: "Get pyenv list" |
| 80 | + command: pyenv versions |
| 81 | + - run: |
| 82 | + name: "Set Python Version" |
| 83 | + command: pyenv global 3.7.0 |
| 84 | + - run: |
| 85 | + name: "Update pip" |
| 86 | + command: pip install -U pip |
| 87 | + - setup_tox |
| 88 | + - restore_tox_cache |
| 89 | + - run: tox -e docker-tests |
| 90 | + - save_tox_cache |
| 91 | + |
44 | 92 | lint:
|
45 |
| - executor: python38 |
| 93 | + executor: py38 |
46 | 94 | steps:
|
47 | 95 | - checkout
|
48 | 96 | - setup_tox
|
49 | 97 | - restore_tox_cache
|
50 | 98 | - run: tox -e lint
|
51 | 99 | - save_tox_cache
|
52 | 100 |
|
| 101 | + build-py34: |
| 102 | + parameters: |
| 103 | + package: |
| 104 | + type: string |
| 105 | + default: "core" |
| 106 | + executor: py34 |
| 107 | + steps: |
| 108 | + - checkout |
| 109 | + - run: |
| 110 | + name: "Install tox" |
| 111 | + command: sudo pip install -U tox virtualenv tox-factor |
| 112 | + - restore_tox_cache |
| 113 | + - run: |
| 114 | + name: "Run scripts/run-tox-scenario" |
| 115 | + command: tox -f py34-<< parameters.package >> |
| 116 | + - save_tox_cache |
| 117 | + |
| 118 | + build: |
| 119 | + parameters: |
| 120 | + version: |
| 121 | + type: string |
| 122 | + default: "py38" |
| 123 | + package: |
| 124 | + type: string |
| 125 | + default: "core" |
| 126 | + executor: << parameters.version >> |
| 127 | + steps: |
| 128 | + - run_tox_scenario: |
| 129 | + pattern: << parameters.version >>-<< parameters.package >> |
| 130 | + |
53 | 131 | workflows:
|
54 | 132 | main:
|
55 | 133 | jobs:
|
| 134 | + - build: |
| 135 | + matrix: |
| 136 | + parameters: |
| 137 | + version: ["py38", "py37", "py36", "py35", "pypy3"] |
| 138 | + package: ["core", "exporter", "instrumentation"] |
| 139 | + - build-py34: |
| 140 | + matrix: |
| 141 | + parameters: |
| 142 | + package: ["core", "exporter", "instrumentation"] |
56 | 143 | - docs
|
57 | 144 | - lint
|
| 145 | + - docker-tests |
0 commit comments