-
Notifications
You must be signed in to change notification settings - Fork 435
/
config.yml
173 lines (159 loc) · 4.45 KB
/
config.yml
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
168
169
170
171
172
173
runtest: &runtest
steps:
- checkout
- run:
name: Install GPflow
command: |
pip install -U pip
pip install -e .
pip install -r tests_requirements.txt
- run:
name: Run tests
command: |
pytest -v -W ignore::UserWarning --durations=10 -m "${PYTEST_FILTER}" --cov=./gpflow ./tests
- run:
name: Upload coverage report
command: |
bash <(curl -s https://codecov.io/bash) -t "${CODECOV_TOKEN}"
version: 2.1
jobs:
verify-install:
docker:
- image: circleci/python:3.6-buster
steps:
- checkout
- run:
name: Check installed dependencies are compatible
command: |
pip install --progress-bar=off -e .
pip check -vvv
python -c "import gpflow"
type-check:
docker:
- image: circleci/python:3.6-buster
steps:
- checkout
- run:
name: Install type checker
command: pip install mypy
- run:
name: Run type checker
command: mypy gpflow tests
unit-test:
<<: *runtest
docker:
- image: circleci/python:3.6-buster
environment:
PYTEST_FILTER: not notebooks
notebook-test:
<<: *runtest
docker:
- image: circleci/python:3.6-buster
environment:
PYTEST_FILTER: notebooks
format-checker:
docker:
- image: circleci/python:3.6-buster
steps:
- checkout
- run:
name: Install black and isort
command: |
pip install black==19.10b0 isort
- run:
name: Run format check
command: |
make format-check
trigger-docs-generation:
docker:
- image: circleci/python:3.6-buster
environment:
ORGANIZATION: GPflow
PROJECT: docs
BRANCH: << pipeline.git.branch >>
steps:
- run:
name: Trigger the Build Job in Docs repo
# Compiled documentation for readthedocs are built and stored in the https://github.com/GPflow/docs/ repository
# For configuration of the doc build, see https://github.com/GPflow/docs/blob/develop/.circleci/config.yml
command: |
BUILD_INFO=$(curl -X POST -H -d \
"{}" \
"https://circleci.com/api/v1/project/$ORGANIZATION/$PROJECT/tree/$BRANCH?circle-token=$DOCS_TOKEN")
deploy:
docker:
- image: circleci/python:3.6-buster
steps:
- checkout
- run:
name: Verify git tag vs. VERSION
command: |
VERSION="v$(cat VERSION | tr -d '\t\r\n ')"
if [ "$VERSION" != "$CIRCLE_TAG" ]; then
echo "The package version ($VERSION) and the latest tag version ($CIRCLE_TAG) are different"
exit 1
fi
- run:
name: Install twine
command: |
pip install twine
- run:
name: Init .pypirc
command: |
echo -e "[pypi]" >> ~/.pypirc
echo -e "username = artemav" >> ~/.pypirc
echo -e "password = $PYPI_PASSWORD" >> ~/.pypirc
- run:
name: Create pip package
command: |
python setup.py bdist_wheel sdist
- run:
name: Upload to PyPI
command: |
twine upload dist/*
workflows:
version: 2.1
build_test_and_deploy:
jobs:
- verify-install:
filters:
tags:
only: /^v[0-9]+(\.[0-9]+)*(-rc[0-9]+)?/
- type-check:
filters:
tags:
only: /^v[0-9]+(\.[0-9]+)*(-rc[0-9]+)?/
- format-checker:
filters:
tags:
only: /^v[0-9]+(\.[0-9]+)*(-rc[0-9]+)?/
- unit-test:
requires:
- format-checker
filters:
tags:
only: /^v[0-9]+(\.[0-9]+)*(-rc[0-9]+)?/
- notebook-test:
requires:
- format-checker
filters:
tags:
only: /^v[0-9]+(\.[0-9]+)*(-rc[0-9]+)?/
- trigger-docs-generation:
requires:
- unit-test
- notebook-test
filters:
branches:
only:
- master
- develop
- deploy:
requires:
- unit-test
- notebook-test
filters:
tags:
only: /^v[0-9]+(\.[0-9]+)*(-rc[0-9]+)?/
branches:
ignore: /.*/