|
1 | 1 | version: 2.1 |
2 | 2 |
|
3 | 3 | orbs: |
4 | | - win: circleci/windows@2.2.0 |
5 | | - |
6 | | -jobs: |
7 | | - # |
8 | | - # linux |
9 | | - # |
10 | | - |
11 | | - test-py38: &full-test-template |
12 | | - docker: |
13 | | - - image: circleci/python:3.8-buster |
14 | | - |
15 | | - working_directory: ~/repo/ |
16 | | - |
17 | | - steps: |
18 | | - - checkout |
19 | | - |
20 | | - - restore_cache: |
21 | | - key: v1-dependencies-{{ checksum "requirements.txt" }}-{{ .Environment.CIRCLE_JOB }} |
22 | | - - run: python -m virtualenv env |
23 | | - - run: &install-dependences-template |
24 | | - name: install requirements |
25 | | - command: | |
26 | | - env/bin/pip install -r ./requirements.txt |
27 | | - env/bin/pip install coverage |
28 | | - - save_cache: |
29 | | - key: v1-dependencies-{{ checksum "requirements.txt" }}-{{ .Environment.CIRCLE_JOB }} |
30 | | - paths: |
31 | | - - env |
32 | | - |
33 | | - - run: env/bin/coverage run -m unittest discover |
34 | | - |
35 | | - test-py37: |
36 | | - <<: *full-test-template |
37 | | - docker: |
38 | | - - image: circleci/python:3.7-stretch |
39 | | - |
40 | | - test-py36: |
41 | | - <<: *full-test-template |
42 | | - docker: |
43 | | - - image: circleci/python:3.6-jessie |
44 | | - |
45 | | - test-py35: |
46 | | - <<: *full-test-template |
47 | | - docker: |
48 | | - - image: circleci/python:3.5-jessie |
49 | | - |
50 | | - # |
51 | | - # macOS |
52 | | - # |
53 | | - |
54 | | - test-osx-py38: &osx-tests-template |
55 | | - macos: |
56 | | - xcode: "11.2.1" |
57 | | - environment: |
58 | | - PYTHON: 3.8.0 |
59 | | - HOMEBREW_NO_AUTO_UPDATE: 1 |
60 | | - |
61 | | - working_directory: ~/repo |
62 | | - |
63 | | - steps: |
64 | | - - checkout |
65 | | - |
66 | | - - run: brew install pyenv |
67 | | - |
68 | | - # Install desired python version |
69 | | - - restore_cache: |
70 | | - keys: |
71 | | - - pyenv-{{ .Environment.CIRCLE_JOB }}-xcode-11.2.1 |
72 | | - - run: pyenv install $PYTHON -s |
73 | | - - save_cache: |
74 | | - key: pyenv-{{ .Environment.CIRCLE_JOB }}-xcode-11.2.1 |
75 | | - paths: |
76 | | - - ~/.pyenv |
77 | | - |
78 | | - # Set local python version |
79 | | - - run: |
80 | | - name: create virtualenv |
81 | | - command: | |
82 | | - eval "$(pyenv init -)" |
83 | | - pyenv local $PYTHON |
84 | | - python -m pip install virtualenv |
85 | | - python -m virtualenv env |
86 | | - # Restore cache |
87 | | - - restore_cache: |
88 | | - key: v1-dependencies-{{ checksum "requirements.txt" }}-{{ .Environment.CIRCLE_JOB }} |
89 | | - - run: *install-dependences-template |
90 | | - - save_cache: |
91 | | - key: v1-dependencies-{{ checksum "requirements.txt" }}-{{ .Environment.CIRCLE_JOB }} |
92 | | - paths: |
93 | | - - env |
94 | | - |
95 | | - - run: env/bin/coverage run -m unittest discover |
96 | | - |
97 | | - |
98 | | - test-osx-py37: |
99 | | - <<: *osx-tests-template |
100 | | - environment: |
101 | | - PYTHON: 3.7.0 |
102 | | - HOMEBREW_NO_AUTO_UPDATE: 1 |
103 | | - |
104 | | - test-osx-py36: |
105 | | - <<: *osx-tests-template |
106 | | - environment: |
107 | | - PYTHON: 3.6.5 |
108 | | - HOMEBREW_NO_AUTO_UPDATE: 1 |
109 | | - |
110 | | - test-osx-py35: |
111 | | - <<: *osx-tests-template |
112 | | - environment: |
113 | | - PYTHON: 3.5.5 |
114 | | - HOMEBREW_NO_AUTO_UPDATE: 1 |
115 | | - BASH_ENV: /Users/distiller/repo/.circleci/.bashrc_macOS |
116 | | - |
117 | | - # |
118 | | - # Windows x64 |
119 | | - # |
120 | | - |
121 | | - test-win-py38: &win-tests-template |
122 | | - executor: |
123 | | - name: win/default |
124 | | - |
125 | | - environment: |
126 | | - PYTHON: 3.8.0 |
127 | | - |
128 | | - working_directory: ~/repo |
129 | | - |
130 | | - steps: |
131 | | - - checkout |
132 | | - |
133 | | - # Install python |
134 | | - - restore_cache: |
135 | | - key: nuget-{{ .Environment.CIRCLE_JOB }} |
136 | | - - run: |
137 | | - name: install python |
138 | | - command: nuget install python -Version $env:PYTHON -ExcludeVersion -OutputDirectory . |
139 | | - - save_cache: |
140 | | - key: nuget-{{ .Environment.CIRCLE_JOB }} |
141 | | - paths: |
142 | | - - .\python |
143 | | - |
144 | | - # Set up virtual environment |
145 | | - - run: |
146 | | - name: create virtualenv |
147 | | - command: | |
148 | | - .\python\tools\python.exe --version |
149 | | - .\python\tools\python.exe -m pip install virtualenv |
150 | | - .\python\tools\python.exe -m virtualenv env |
151 | | - # Install requirements |
152 | | - - restore_cache: |
153 | | - key: v1-dependencies-{{ checksum "requirements.txt" }}-{{ .Environment.CIRCLE_JOB }} |
154 | | - - run: &win-install-dependencies-template |
155 | | - name: install dependencies |
156 | | - command: | |
157 | | - env\Scripts\activate.ps1 |
158 | | - python --version |
159 | | - pip install -r requirements.txt |
160 | | - pip install coverage |
161 | | - - save_cache: |
162 | | - key: v1-dependencies-{{ checksum "requirements.txt" }}-{{ .Environment.CIRCLE_JOB }} |
163 | | - paths: |
164 | | - - env |
165 | | - |
166 | | - # Run tests |
167 | | - - run: &win-run-unittests-template |
168 | | - name: run unittests |
169 | | - command: | |
170 | | - env\Scripts\activate.ps1 |
171 | | - coverage run -m unittest discover |
172 | | - test-win-py37: |
173 | | - <<: *win-tests-template |
174 | | - environment: |
175 | | - PYTHON: 3.7.5 |
176 | | - |
177 | | - test-win-py36: |
178 | | - <<: *win-tests-template |
179 | | - environment: |
180 | | - PYTHON: 3.6.8 |
181 | | - |
182 | | - test-win-py35: |
183 | | - <<: *win-tests-template |
184 | | - environment: |
185 | | - PYTHON: 3.5.4 |
| 4 | + dwave: dwave/orb-examples@2 |
186 | 5 |
|
187 | 6 | workflows: |
188 | 7 | version: 2.1 |
189 | 8 | tests: |
190 | 9 | jobs: |
191 | | - - test-py38 |
192 | | - - test-py37 |
193 | | - - test-py36 |
194 | | - - test-py35 |
195 | | - - test-osx-py38 |
196 | | - - test-osx-py37 |
197 | | - - test-osx-py36 |
198 | | - - test-osx-py35 |
199 | | - - test-win-py38 |
200 | | - - test-win-py37 |
201 | | - - test-win-py36 |
202 | | - - test-win-py35 |
| 10 | + - dwave/test-linux |
| 11 | + - dwave/test-osx |
| 12 | + - dwave/test-win |
| 13 | + |
| 14 | + daily: |
| 15 | + triggers: |
| 16 | + - schedule: |
| 17 | + cron: "0 10 * * *" |
| 18 | + filters: |
| 19 | + branches: |
| 20 | + only: |
| 21 | + - master |
| 22 | + - main |
| 23 | + jobs: |
| 24 | + - dwave/test-linux |
| 25 | + - dwave/test-osx |
| 26 | + - dwave/test-win |
0 commit comments