|
1 | | -version: 2 |
| 1 | +version: 2.1 |
2 | 2 |
|
| 3 | +commands: |
| 4 | + mac_install_python: |
| 5 | + parameters: |
| 6 | + python_version: |
| 7 | + description: "version of python to install" |
| 8 | + type: string |
| 9 | + default: 3.6.5 |
| 10 | + steps: |
| 11 | + - run: | |
| 12 | + brew update |
| 13 | + python --version |
| 14 | + sudo -H pip install --upgrade virtualenv |
| 15 | + brew install pyenv |
| 16 | + echo 'eval "$(pyenv init --path)"' >> ~/.bash_profile |
| 17 | + echo 'eval "$(pyenv init -)"' >> ~/.bash_profile |
| 18 | + source ~/.bash_profile |
| 19 | + pyenv install << parameters.python_version >> |
| 20 | + pyenv versions |
| 21 | + pyenv global << parameters.python_version >> |
| 22 | + python --version |
| 23 | +
|
| 24 | + install_run_tests: |
| 25 | + steps: |
| 26 | + - run: | |
| 27 | + python setup.py install |
| 28 | + python -m pip install pytest |
| 29 | + - run: pytest |
| 30 | + |
3 | 31 | jobs: |
4 | | - python_3_6_5: |
| 32 | + mac_python_3_6: |
5 | 33 | shell: /bin/bash --login |
6 | 34 | macos: |
7 | 35 | xcode: '9.4.1' |
8 | 36 | steps: |
9 | 37 | - checkout |
10 | | - - run: | |
11 | | - brew update |
12 | | - python --version |
13 | | - sudo -H pip install --upgrade virtualenv |
14 | | - brew install pyenv |
15 | | - echo 'eval "$(pyenv init --path)"' >> ~/.bash_profile |
16 | | - echo 'eval "$(pyenv init -)"' >> ~/.bash_profile |
17 | | - source ~/.bash_profile |
18 | | - pyenv install 3.6.5 |
19 | | - pyenv versions |
20 | | - pyenv global 3.6.5 |
21 | | - python --version |
22 | | - - run: python setup.py install |
23 | | - - run: python setup.py test |
| 38 | + - mac_install_python: |
| 39 | + python_version: "3.6.5" |
| 40 | + - install_run_tests |
24 | 41 |
|
25 | | - python_3_7_10: |
| 42 | + |
| 43 | + mac_python_3_7: |
26 | 44 | shell: /bin/bash --login |
27 | 45 | macos: |
28 | 46 | xcode: '9.4.1' |
29 | 47 | steps: |
30 | 48 | - checkout |
31 | | - - run: | |
32 | | - brew update |
33 | | - python --version |
34 | | - sudo -H pip install --upgrade virtualenv |
35 | | - brew install pyenv |
36 | | - echo 'eval "$(pyenv init --path)"' >> ~/.bash_profile |
37 | | - echo 'eval "$(pyenv init -)"' >> ~/.bash_profile |
38 | | - source ~/.bash_profile |
39 | | - pyenv install 3.7.10 |
40 | | - pyenv versions |
41 | | - pyenv global 3.7.10 |
42 | | - python --version |
43 | | - - run: python setup.py install |
44 | | - - run: python setup.py test |
| 49 | + - mac_install_python: |
| 50 | + python_version: "3.7.10" |
| 51 | + - install_run_tests |
| 52 | + |
45 | 53 |
|
46 | | - python_3_8_10: |
| 54 | + mac_python_3_8: |
47 | 55 | shell: /bin/bash --login |
48 | 56 | macos: |
49 | 57 | xcode: '9.4.1' |
50 | 58 | steps: |
51 | 59 | - checkout |
52 | | - - run: | |
53 | | - brew update |
54 | | - python --version |
55 | | - sudo -H pip install --upgrade virtualenv |
56 | | - brew install pyenv |
57 | | - echo 'eval "$(pyenv init --path)"' >> ~/.bash_profile |
58 | | - echo 'eval "$(pyenv init -)"' >> ~/.bash_profile |
59 | | - source ~/.bash_profile |
60 | | - pyenv install 3.8.10 |
61 | | - pyenv versions |
62 | | - pyenv global 3.8.10 |
63 | | - python --version |
64 | | - - run: python setup.py install |
65 | | - - run: python setup.py test |
| 60 | + - mac_install_python: |
| 61 | + python_version: "3.8.10" |
| 62 | + - install_run_tests |
66 | 63 |
|
67 | | - python_3_9_5: |
| 64 | + mac_python_3_9: |
68 | 65 | shell: /bin/bash --login |
69 | 66 | macos: |
70 | 67 | xcode: '9.4.1' |
71 | 68 | steps: |
72 | 69 | - checkout |
73 | | - - run: | |
74 | | - brew update |
75 | | - python --version |
76 | | - sudo -H pip install --upgrade virtualenv |
77 | | - brew install pyenv |
78 | | - echo 'eval "$(pyenv init --path)"' >> ~/.bash_profile |
79 | | - echo 'eval "$(pyenv init -)"' >> ~/.bash_profile |
80 | | - source ~/.bash_profile |
81 | | - pyenv install 3.9.5 |
82 | | - pyenv versions |
83 | | - pyenv global 3.9.5 |
84 | | - python --version |
85 | | - - run: python setup.py install |
86 | | - - run: python setup.py test |
| 70 | + - mac_install_python: |
| 71 | + python_version: "3.9.5" |
| 72 | + - install_run_tests |
| 73 | + |
| 74 | + linux_python_3_6: |
| 75 | + machine: |
| 76 | + image: python:3.6 |
| 77 | + steps: |
| 78 | + - checkout |
| 79 | + - install_run_tests |
| 80 | + |
| 81 | + linux_python_3_7: |
| 82 | + machine: |
| 83 | + image: python:3.7 |
| 84 | + steps: |
| 85 | + - checkout |
| 86 | + - install_run_tests |
| 87 | + |
| 88 | + linux_python_3_8: |
| 89 | + machine: |
| 90 | + image: python:3.8 |
| 91 | + steps: |
| 92 | + - checkout |
| 93 | + - install_run_tests |
| 94 | + |
| 95 | + linux_python_3_9: |
| 96 | + machine: |
| 97 | + image: python:3.9 |
| 98 | + steps: |
| 99 | + - checkout |
| 100 | + - install_run_tests |
87 | 101 |
|
88 | 102 | workflows: |
89 | 103 | version: 2 |
90 | 104 | python_matrix_build: |
91 | 105 | jobs: |
92 | | - - python_3_6_5 |
93 | | - - python_3_7_10 |
94 | | - - python_3_8_10 |
95 | | - - python_3_9_5 |
| 106 | + - mac_python_3_6 |
| 107 | + - mac_python_3_7 |
| 108 | + - mac_python_3_8 |
| 109 | + - mac_python_3_9 |
| 110 | + - linux_python_3_6 |
| 111 | + - linux_python_3_7 |
| 112 | + - linux_python_3_8 |
| 113 | + - linux_python_3_9 |
0 commit comments