-
Notifications
You must be signed in to change notification settings - Fork 5
/
evergreen.yml
63 lines (54 loc) · 1.22 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
buildvariants:
- display_name: Ubuntu 22.04
name: ubuntu2204
run_on:
- ubuntu2204-small
tasks:
- name: unit_tests
- name: deploy
functions:
create virtualenv:
- command: shell.exec
params:
working_dir: src
script: |
set -o errexit
set -o verbose
/opt/mongodbtoolchain/v3/bin/python3 -m venv venv
. venv/bin/activate
pip install --upgrade pip
pip install poetry
poetry install
pre:
- command: git.get_project
params:
directory: src
- func: create virtualenv
post:
- command: attach.xunit_results
params:
file: src/junit-*.xml
tasks:
- name: unit_tests
commands:
- command: shell.exec
params:
working_dir: src
script: |
set -o errexit
set -o verbose
. venv/bin/activate
poetry run pytest --junitxml=junit-test-output.xml
- name: deploy
patchable: false
depends_on:
- name: unit_tests
commands:
- command: subprocess.exec
params:
working_dir: src
add_to_path: [ "${workdir}/src/venv/bin" ]
command: poetry publish --build
env:
POETRY_HTTP_BASIC_PYPI_USERNAME: ${pypi_user}
POETRY_HTTP_BASIC_PYPI_PASSWORD: ${pypi_password}