Skip to content

Commit ac14bd0

Browse files
committed
ci: run tests on circle ci
1 parent 5c1a210 commit ac14bd0

File tree

8 files changed

+139
-46
lines changed

8 files changed

+139
-46
lines changed

.circleci/config.yml

Lines changed: 114 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,81 +1,172 @@
1-
ci-steps: &ci-steps
1+
build-wheel: &build-wheel
22
working_directory: /work
33
steps:
44
- checkout
55
- run:
66
name: build wheel
77
command: bash /work/ci/build-wheels.sh
88

9+
test: &test
10+
working_directory: ~/bencoder.pyx
11+
steps:
12+
- checkout
13+
- run:
14+
name: install dependencies
15+
command: |
16+
sudo pip install -r tox-requirements.txt
17+
- run:
18+
name: test
19+
command: |
20+
tox -e ${CIRCLE_JOB}
21+
22+
test_pypy: &test_pypy
23+
working_directory: ~/bencoder.pyx
24+
steps:
25+
- checkout
26+
- run:
27+
name: install dependencies
28+
command: |
29+
pip install -r tox-requirements.txt
30+
- run:
31+
name: test
32+
command: |
33+
tox -e ${CIRCLE_JOB}
34+
35+
936
version: 2
1037
jobs:
38+
#
39+
# test
40+
#
41+
py27:
42+
docker:
43+
- image: circleci/python:2.7
44+
<<: *test
45+
py34:
46+
docker:
47+
- image: circleci/python:3.4
48+
<<: *test
49+
py35:
50+
docker:
51+
- image: circleci/python:3.5
52+
<<: *test
53+
py36:
54+
docker:
55+
- image: circleci/python:3.6
56+
<<: *test
57+
py37:
58+
docker:
59+
- image: circleci/python:3.7-rc
60+
<<: *test
61+
pypy:
62+
docker:
63+
- image: pypy:2
64+
<<: *test_pypy
65+
pypy3:
66+
docker:
67+
- image: pypy:3
68+
<<: *test_pypy
69+
70+
#
71+
# build manylinux wheel
72+
#
73+
1174
#
1275
# x64
1376
#
1477
manylinux-x64_cp27-cp27m:
1578
docker:
1679
- image: quay.io/pypa/manylinux1_x86_64
17-
<<: *ci-steps
80+
<<: *build-wheel
1881

1982
manylinux-x64_cp27-cp27mu:
2083
docker:
2184
- image: quay.io/pypa/manylinux1_x86_64
22-
<<: *ci-steps
85+
<<: *build-wheel
2386

2487
manylinux-x64_cp34-cp34m:
2588
docker:
2689
- image: quay.io/pypa/manylinux1_x86_64
27-
<<: *ci-steps
90+
<<: *build-wheel
2891

2992
manylinux-x64_cp35-cp35m:
3093
docker:
3194
- image: quay.io/pypa/manylinux1_x86_64
32-
<<: *ci-steps
95+
<<: *build-wheel
3396

3497
manylinux-x64_cp36-cp36m:
3598
docker:
3699
- image: quay.io/pypa/manylinux1_x86_64
37-
<<: *ci-steps
100+
<<: *build-wheel
38101
#
39102
# x86
40103
#
41104
manylinux-x86_cp27-cp27m:
42105
docker:
43106
- image: quay.io/pypa/manylinux1_i686
44-
<<: *ci-steps
107+
<<: *build-wheel
45108

46109
manylinux-x86_cp27-cp27mu:
47110
docker:
48111
- image: quay.io/pypa/manylinux1_i686
49-
<<: *ci-steps
112+
<<: *build-wheel
50113

51114
manylinux-x86_cp34-cp34m:
52115
docker:
53116
- image: quay.io/pypa/manylinux1_i686
54-
<<: *ci-steps
117+
<<: *build-wheel
55118

56119
manylinux-x86_cp35-cp35m:
57120
docker:
58121
- image: quay.io/pypa/manylinux1_i686
59-
<<: *ci-steps
122+
<<: *build-wheel
60123

61124
manylinux-x86_cp36-cp36m:
62125
docker:
63126
- image: quay.io/pypa/manylinux1_i686
64-
<<: *ci-steps
127+
<<: *build-wheel
65128

66129

67130
workflows:
68131
version: 2
69-
build-test-deploy:
132+
test_and_build:
70133
jobs:
71-
- manylinux-x64_cp27-cp27m
72-
- manylinux-x64_cp27-cp27mu
73-
- manylinux-x64_cp34-cp34m
74-
- manylinux-x64_cp35-cp35m
75-
- manylinux-x64_cp36-cp36m
76-
77-
- manylinux-x86_cp27-cp27m
78-
- manylinux-x86_cp27-cp27mu
79-
- manylinux-x86_cp34-cp34m
80-
- manylinux-x86_cp35-cp35m
81-
- manylinux-x86_cp36-cp36m
134+
- py27
135+
- py34
136+
- py35
137+
- py36
138+
- py37
139+
- pypy
140+
- pypy3
141+
142+
- manylinux-x64_cp27-cp27m:
143+
requires:
144+
- py27
145+
- manylinux-x64_cp27-cp27mu:
146+
requires:
147+
- py27
148+
- manylinux-x64_cp34-cp34m:
149+
requires:
150+
- py34
151+
- manylinux-x64_cp35-cp35m:
152+
requires:
153+
- py35
154+
- manylinux-x64_cp36-cp36m:
155+
requires:
156+
- py36
157+
158+
- manylinux-x86_cp27-cp27m:
159+
requires:
160+
- py27
161+
- manylinux-x86_cp27-cp27mu:
162+
requires:
163+
- py27
164+
- manylinux-x86_cp34-cp34m:
165+
requires:
166+
- py34
167+
- manylinux-x86_cp35-cp35m:
168+
requires:
169+
- py35
170+
- manylinux-x86_cp36-cp36m:
171+
requires:
172+
- py36

ci/travis_osx_install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ git clone https://github.com/matthew-brett/multibuild.git
22
source multibuild/osx_utils.sh
33
get_macpython_environment $VERSION venv
44
pip install --upgrade pip wheel
5-
pip install -r dev-requirements.txt
5+
pip install -r test-requirements.txt

dev-requirements.txt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,2 @@
1-
-r build-requirements.txt
2-
pytest==3.2.5
3-
coverage==4.5.1
4-
tox==2.5.0
1+
-r test-requirements.txt
2+
-r tox-requirements.txt

setup.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@
66
from setuptools.extension import Extension
77
from setuptools.command.test import test as TestCommand
88

9-
version = platform.python_version_tuple()
10-
install_requires = []
11-
129
pyx_path = 'bencoder.pyx'
1310
c_path = 'bencoder.c'
1411

@@ -110,6 +107,7 @@ def get_tag(self):
110107
keywords=['bencoding', 'encode', 'decode', 'bittorrent', 'bencode', 'bencoder', 'cython'],
111108
cmdclass=cmdclass,
112109
classifiers=[
110+
'Development Status :: 5 - Production/Stable',
113111
'Environment :: Other Environment',
114112
'Intended Audience :: Developers',
115113
'License :: OSI Approved :: BSD License',
@@ -131,6 +129,6 @@ def get_tag(self):
131129
'Topic :: Utilities',
132130
],
133131
ext_modules=ext_modules,
134-
install_requires=install_requires,
132+
install_requires=[],
135133
tests_require=['cython', 'pytest', 'coverage'],
136134
)

test-requirements.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
-r build-requirements.txt
2+
pytest==3.2.5
3+
coverage==4.5.1

tox-requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
tox==2.5.0

tox-wheels.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ envlist = py27, py33, py34, py35, py36
55
commands = pip wheel {toxinidir} -w {toxinidir}/wheelhouse/
66
skip_install = True
77
deps =
8-
cython
8+
-rbuild-requirements.txt

tox.ini

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,23 @@
11
[tox]
2-
envlist = py27, py33, py34, py35, py36, pypy
2+
envlist = py27, py33, py34, py35, py36, pypy, pypy3
33

44
[testenv]
55
commands =
66
python setup.py test
7-
codecov
7+
codecov -e TOXENV
88
skip_install = True
9-
passenv = CI SEMAPHORE BRANCH_NAME SEMAPHORE_* REVISION CODECOV_TOKEN
10-
deps =
11-
cython
12-
pytest
13-
coverage
14-
codecov
9+
passenv =
10+
CI
11+
BRANCH_NAME
12+
REVISION
13+
CODECOV_TOKEN
14+
TOXENV
15+
SEMAPHORE
16+
SEMAPHORE_*
17+
TRAVIS
18+
CIRCLECI
19+
CIRCLE_*
1520

16-
[testenv:pypy]
17-
skip_install = False
1821
deps =
19-
cython
20-
pytest
21-
commands = py.test
22+
-rtest-requirements.txt
23+
codecov>=1.4.0

0 commit comments

Comments
 (0)