-
Notifications
You must be signed in to change notification settings - Fork 44
Expand file tree
/
Copy pathconfig.yml
More file actions
167 lines (131 loc) · 3.7 KB
/
Copy pathconfig.yml
File metadata and controls
167 lines (131 loc) · 3.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
version: 2.1
orbs:
ocean: dwave/ocean@1.3
environment:
PIP_PROGRESS_BAR: 'off'
jobs:
test-linux:
parameters:
python-version:
type: string
dimod-version:
type: string
executor:
name: ocean/python
python-version: << parameters.python-version >>
steps:
- checkout
- ocean/pip-install:
requirements: requirements.txt tests/requirements.txt
- ocean/pip-install:
cache: false
packages: . dimod<< parameters.dimod-version >>
- run: &run-python-tests
name: Run Python tests
command: env/bin/coverage run -m unittest discover
- run:
name: Upload code coverage
command: |
. env/bin/activate
codecov # calls `coverage xml`, so we must activate venv
test-macos:
parameters:
python-version:
type: string
xcode:
type: string
macos:
xcode: << parameters.xcode >>
steps:
- checkout
- ocean/brew-install-pyenv
- ocean/pyenv-install-python:
python-version: << parameters.python-version >>
cache-key-prefix: << parameters.xcode >>
- ocean/pip-install:
requirements: requirements.txt tests/requirements.txt
- ocean/pip-install:
cache: false
packages: .
- run: *run-python-tests
test-docs:
executor:
name: ocean/python
python-version: "3.7"
steps:
- checkout
- ocean/pip-install:
requirements: requirements.txt tests/requirements.txt docs/requirements.txt
- run:
name: Build docs
command: |
. env/bin/activate
make -C docs/ html
- store_artifacts:
path: ./docs/build/html
- run:
name: Test docs
command: |
. env/bin/activate
make -C docs/ doctest
- run:
name: Test links
command: |
. env/bin/activate
make -C docs/ linkcheck
build-dist:
executor:
name: ocean/python
python-version: "3.9"
steps:
- checkout
- ocean/pip-install:
requirements: requirements.txt
packages: wheel
cache: false
- ocean/build-dist:
dist-type: sdist bdist_wheel
- store_artifacts:
path: dist
- persist_to_workspace:
root: dist
paths: .
workflows:
test:
jobs:
- test-linux:
name: test-linux-py<< matrix.python-version >><<# matrix.dimod-version >>-dimod<< matrix.dimod-version >><</ matrix.dimod-version >>
matrix:
parameters:
python-version: &python-versions ["3.6.12", "3.7.9", "3.8.6", "3.9.0", "3.10.0"]
dimod-version: ["", "~=0.8.0,>=0.8.21", "~=0.9.0", "~=0.10.0,>0.10.4"]
exclude:
# dimod < 0.10 not supported on py310
- python-version: "3.10.0"
dimod-version: "~=0.8.0,>=0.8.21"
- python-version: "3.10.0"
dimod-version: "~=0.9.0"
- test-macos:
name: test-macos-py<< matrix.python-version >>
matrix:
parameters:
python-version: *python-versions
xcode: ["13.2.0"]
- test-docs
- build-dist
deploy:
jobs:
- build-dist:
filters:
tags:
only: /^[0-9]+(\.[0-9]+)*((\.dev|rc)([0-9]+)?)?$/
branches:
ignore: /.*/
- ocean/pypi-deploy:
requires:
- build-dist
filters:
tags:
only: /^[0-9]+(\.[0-9]+)*((\.dev|rc)([0-9]+)?)?$/
branches:
ignore: /.*/