-
Notifications
You must be signed in to change notification settings - Fork 25
Expand file tree
/
Copy pathconfig.yml
More file actions
109 lines (101 loc) · 2.48 KB
/
config.yml
File metadata and controls
109 lines (101 loc) · 2.48 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
version: 2.1
orbs:
python: circleci/python@2.0.3
workflows:
version: 2
build_test_deploy:
jobs:
- build:
filters:
branches:
ignore:
- gh-pages
- test_integration:
requires:
- build
filters:
branches:
ignore:
- gh-pages
matrix:
parameters:
python-version: ["3.6.9", "3.7.7", "3.8.6", "3.9.3", "3.9.9", "3.9.10", "latest"]
- hold:
type: approval
requires:
- test_integration
filters:
branches:
only:
- master
tags:
only: /[0-9]+(\.[0-9]+)*/
- deploy:
requires:
- hold
jobs:
build:
executor: python/default
steps:
- checkout:
name: Checkout Git
- python/install-packages:
pkg-manager:
poetry
- run:
name: Build Package
command: |
echo -e "Running sdist"
poetry build
- persist_to_workspace:
root: /home/circleci/project/
paths:
- .
test_integration:
description: Python << parameters.python-version >>
parameters:
python-version:
type: string
docker:
- image: cimg/python:<< parameters.python-version >>
steps:
- attach_workspace:
at: /tmp/artifact
name: Attach build artifact
- python/install-packages:
pkg-manager:
poetry
- run:
command: |
pip install poetry -U
- run:
name: Install package
command: |
cd /tmp/artifact
poetry install --extras docs
- run:
name: Run integration test
command: |
python /tmp/artifact/tests/test_integration.py
deploy:
docker:
- image: cimg/python:3.10.2
steps:
- attach_workspace:
at: /tmp/artifact
name: Attach build artifact
- python/install-packages:
pkg-manager:
poetry
- run:
name: init .pypirc
command: |
cd /tmp/artifact
echo -e "[pypi]" >> ~/.pypirc
echo -e "username = $TWINE_USERNAME" >> ~/.pypirc
echo -e "password = $TWINE_PASSWORD" >> ~/.pypirc
- run:
name: Upload to pypi
command: |
cd /tmp/artifact
poetry publish