-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathevergreen.yml
161 lines (137 loc) · 4.07 KB
/
evergreen.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
buildvariants:
- display_name: Ubuntu 18.04
name: ubuntu1804
run_on:
- ubuntu1804-small
tasks:
- name: unit_tests_3.7
- name: unit_tests_3.8
- name: unit_tests_3.9
- name: check_pypi_version
- name: build_docs
- display_name: Windows
name: windows
run_on:
- windows-64-vsMulti-small
tasks:
- name: unit_tests_3.7
- name: unit_tests_3.8
- name: unit_tests_3.9
- display_name: macOS Mojave
name: macos-1014
run_on:
- macos-1014
tasks:
- name: unit_tests_3.7
- name: unit_tests_3.8
- name: unit_tests_3.9
functions:
run_tests:
- command: shell.exec
params:
working_dir: src
script: |
set -o errexit
set -o verbose
export LC_ALL=C.UTF-8
export LANG=C.UTF-8
if [ "Windows_NT" = "$OS" ]; then
dos2unix "venv/Scripts/activate"
. "venv/Scripts/activate"
else
export PYENV_ROOT="$PWD/pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init -)"
eval "$(pyenv init --path)"
eval "$(pyenv virtualenv-init -)"
fi
poetry run pytest --cov=src --junitxml=junit-test-output.xml
install_poetry:
- command: shell.exec
params:
working_dir: src
script: |
set -o errexit
set -o verbose
export LC_ALL=C.UTF-8
export LANG=C.UTF-8
echo $OS
if [ "Windows_NT" = "$OS" ]; then
PYTHON="/cygdrive/c/python/python${short_python_version}/python.exe"
$PYTHON -m venv venv
dos2unix "venv/Scripts/activate"
. "venv/Scripts/activate"
$PYTHON -m ensurepip --upgrade
pip install poetry
else
git clone https://github.com/pyenv/pyenv.git pyenv
export PYENV_ROOT="$PWD/pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init -)"
eval "$(pyenv init --path)"
git clone https://github.com/pyenv/pyenv-virtualenv.git $(pyenv root)/plugins/pyenv-virtualenv
SDKROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk MACOSX_DEPLOYMENT_TARGET=10.14 pyenv install ${python_version}
pyenv virtualenv ${python_version} venv-${python_version}
pyenv global venv-${python_version}
pip install --upgrade pip
pip install poetry
fi
poetry install
check_version_update:
- command: shell.exec
params:
working_dir: src
script: |
set -o errexit
set -o verbose
if [ "${is_patch}" = "true" ]; then
wget -q https://github.com/dbradf/pypi-version-check/releases/download/v0.2.1/pypi-version-check
chmod +x pypi-version-check
./pypi-version-check --check-changelog
fi
build_docs:
- command: shell.exec
params:
working_dir: src/emm-docs
script: |
set -o errexit
set -o verbose
wget -q https://github.com/gohugoio/hugo/releases/download/v0.92.1/hugo_0.92.1_Linux-64bit.tar.gz
tar xf hugo_0.92.1_Linux-64bit.tar.gz
./hugo
pre:
- command: git.get_project
params:
directory: src
post:
- command: attach.xunit_results
params:
file: src/junit-*.xml
tasks:
- name: unit_tests_3.7
commands:
- func: install_poetry
vars:
python_version: "3.7.1"
short_python_version: "37"
- func: run_tests
- name: unit_tests_3.8
commands:
- func: install_poetry
vars:
python_version: "3.8.10"
short_python_version: "38"
- func: run_tests
- name: unit_tests_3.9
commands:
- func: install_poetry
vars:
python_version: "3.9.7"
short_python_version: "39"
- func: run_tests
- name: check_pypi_version
commands:
- func: check_version_update
- name: build_docs
commands:
- func: build_docs