Repository navigation
Expand file tree
/
Copy pathconfig.yml
More file actions
102 lines (94 loc) · 2.35 KB
/
Copy pathconfig.yml
File metadata and controls
102 lines (94 loc) · 2.35 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
version: 2.1
orbs:
python: circleci/python@1.0.0
win: circleci/windows@2.2.0
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.5", "3.7.7", "3.8.6", "3.9.3", "3.9.6", "3.9.9", "latest"]
- hold:
type: approval
requires:
- test_integration
filters:
branches:
only:
- master
tags:
only: /[0-9]+(\.[0-9]+)*/
- deploy:
requires:
- hold
jobs:
build:
docker:
- image: circleci/python:latest
steps:
- checkout:
name: Checkout Git
- run:
name: Build Package
command: |
echo -e "Running sdist"
python setup.py sdist
- persist_to_workspace:
root: /home/circleci/project/
paths:
- .
test_integration:
description: Python << parameters.python-version >>
parameters:
python-version:
type: string
docker:
- image: circleci/python:<< parameters.python-version >>
steps:
- attach_workspace:
at: /tmp/artifact
name: Attach build artifact
- run:
name: Install package
command: |
pip install --user '/tmp/artifact'
- run:
name: Run integration test
command: |
python /tmp/artifact/tests/integration.py
deploy:
docker:
- image: circleci/python:latest
steps:
- attach_workspace:
at: /tmp/artifact
name: Attach build artifact
- run:
name: Install dependencies
command: |
pip install setuptools wheel twine
- 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
twine upload dist/*