forked from 1156054203/astair
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbitbucket-pipelines.yml
More file actions
64 lines (61 loc) · 2.33 KB
/
bitbucket-pipelines.yml
File metadata and controls
64 lines (61 loc) · 2.33 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
################################### Definitions ###################################
definitions:
caches:
pip3: ~/.cache/pip3
steps:
- step: &build-test-py2
image: python:2.7.15
name: Build and test Python2
caches:
- pip
script:
- pip install -r requirements.txt
- pip install -r test_requirements.txt
- mkdir -p test-results
- nosetests --with-xunit --xunit-file=test-results/py2_combined_results.xml --with-coverage --cover-erase --cover-xml --cover-xml-file=test-results/py2_coverage.xml --cover-package=astair tests/*
- step: &build-test-py3
image: python:3.5.6
name: Build and test Python3
caches:
- pip3
script:
- pip3 --cache-dir ~/.cache/pip3 install -r requirements.txt
- pip3 --cache-dir ~/.cache/pip3 install -r test_requirements.txt
- mkdir -p test-results
- nosetests --with-xunit --xunit-file=test-results/py3_combined_results.xml --with-coverage --cover-erase --cover-xml --cover-xml-file=test-results/py3_coverage.xml --cover-package=astair tests/*
################################### Pipelines ###################################
pipelines:
default:
- parallel:
- step: *build-test-py2
- step: *build-test-py3
branches:
master:
- parallel:
- step: *build-test-py2
- step: *build-test-py3
- step:
name: Deploy to test.pypi
image: python:3.5.6
deployment: staging
script:
- pip3 --cache-dir ~/.cache/pip3 install -r requirements.txt
- pip3 --cache-dir ~/.cache/pip3 install twine
- python3 setup.py sdist
- python3 setup.py bdist_wheel --universal
- twine upload --repository-url https://test.pypi.org/legacy/ dist/*
tags:
'v*':
- parallel:
- step: *build-test-py2
- step: *build-test-py3
- step:
name: Deploy to pypi
image: python:3.5.6
deployment: production
script:
- pip3 --cache-dir ~/.cache/pip3 install -r requirements.txt
- pip3 --cache-dir ~/.cache/pip3 install twine
- python3 setup.py sdist
- python3 setup.py bdist_wheel --universal
- twine upload dist/*