Skip to content

Commit f846079

Browse files
authored
ci: run tests on Python 3.8 (#79)
* ci: run tests on Python 3.8 * Update config.yml * ci: use cibuildwheel * ci: add CIBW_BEFORE_BUILD * ci: add CIBW_TEST_COMMAND * ci: upload coverage on circleci * ci: add CIBW_TEST_REQUIRES * ci(travis): just use pip * ci: fix circleci config * ci: fix circleci config * ci: fix CIBW_TEST_COMMAND * ci: use deault macos version in travis * ci: install setuptools * ci: fix test for pypy * ci: fix tests for pypy * ci: make pypy3 happy
1 parent 46b7dcf commit f846079

13 files changed

+63
-240
lines changed

.circleci/config.yml

Lines changed: 39 additions & 132 deletions
Original file line numberDiff line numberDiff line change
@@ -1,138 +1,76 @@
1-
build-wheel: &build-wheel
2-
working_directory: /work
3-
steps:
4-
- checkout
5-
- run:
6-
name: build wheel
7-
command: bash /work/ci/build-wheels.sh
8-
- run:
9-
name: upload
10-
command: |
11-
if [ $CIRCLE_TAG ]; then source /work/ci/deploy.sh; fi
12-
- store_artifacts:
13-
path: wheelhouse/
141
test: &test
152
working_directory: ~/bencoder.pyx
163
steps:
174
- checkout
185
- run:
196
name: install dependencies
207
command: |
21-
sudo pip install -r tox-requirements.txt
22-
- restore_cache:
23-
keys:
24-
- tox-env-{{ checksum "test-requirements" }}-{{ checksum "build-requirements.txt" }}
25-
- tox-env-
8+
pip install -U pip setuptools wheel
9+
pip install -r dev-requirements.txt
2610
- run:
2711
name: test
2812
command: |
29-
tox -e ${CIRCLE_JOB}
30-
- save_cache:
31-
key: tox-env-{{ checksum "test-requirements" }}-{{ checksum "build-requirements.txt" }}
32-
paths:
33-
- .tox
34-
test_pypy: &test_pypy
35-
working_directory: ~/bencoder.pyx
36-
steps:
37-
- checkout
38-
- run:
39-
name: install dependencies
40-
command: |
41-
pip install -r tox-requirements.txt
13+
python setup.py test
4214
- run:
43-
name: test
15+
name: upload coverage
4416
command: |
45-
tox -e ${CIRCLE_JOB}
46-
17+
pip install codecov
18+
codecov --required
4719
version: 2
4820
jobs:
4921
#
5022
# test
5123
#
5224
py27:
5325
docker:
54-
- image: circleci/python:2.7
26+
- image: python:2.7
5527
<<: *test
5628
py35:
5729
docker:
58-
- image: circleci/python:3.5
30+
- image: python:3.5
5931
<<: *test
6032
py36:
6133
docker:
62-
- image: circleci/python:3.6
34+
- image: python:3.6
6335
<<: *test
6436
py37:
6537
docker:
66-
- image: circleci/python:3.7
38+
- image: python:3.7
39+
<<: *test
40+
py38:
41+
docker:
42+
- image: python:3.8
6743
<<: *test
6844
pypy:
6945
docker:
7046
- image: pypy:2
71-
<<: *test_pypy
47+
working_directory: ~/bencoder.pyx
48+
steps:
49+
- checkout
50+
- run:
51+
name: install dependencies
52+
command: |
53+
pip install -U pip setuptools wheel
54+
pip install -r dev-requirements.txt
55+
- run:
56+
name: test
57+
command: |
58+
pypy setup.py test
7259
pypy3:
7360
docker:
7461
- image: pypy:3
75-
<<: *test_pypy
76-
77-
#
78-
# build manylinux wheel
79-
#
80-
81-
#
82-
# x64
83-
#
84-
manylinux-x64_cp27-cp27m:
85-
docker:
86-
- image: quay.io/pypa/manylinux1_x86_64
87-
<<: *build-wheel
88-
89-
manylinux-x64_cp27-cp27mu:
90-
docker:
91-
- image: quay.io/pypa/manylinux1_x86_64
92-
<<: *build-wheel
93-
94-
manylinux-x64_cp35-cp35m:
95-
docker:
96-
- image: quay.io/pypa/manylinux1_x86_64
97-
<<: *build-wheel
98-
99-
manylinux-x64_cp36-cp36m:
100-
docker:
101-
- image: quay.io/pypa/manylinux1_x86_64
102-
<<: *build-wheel
103-
104-
manylinux-x64_cp37-cp37m:
105-
docker:
106-
- image: quay.io/pypa/manylinux1_x86_64
107-
<<: *build-wheel
108-
109-
#
110-
# x86
111-
#
112-
manylinux-x86_cp27-cp27m:
113-
docker:
114-
- image: quay.io/pypa/manylinux1_i686
115-
<<: *build-wheel
116-
117-
manylinux-x86_cp27-cp27mu:
118-
docker:
119-
- image: quay.io/pypa/manylinux1_i686
120-
<<: *build-wheel
121-
122-
manylinux-x86_cp35-cp35m:
123-
docker:
124-
- image: quay.io/pypa/manylinux1_i686
125-
<<: *build-wheel
126-
127-
manylinux-x86_cp36-cp36m:
128-
docker:
129-
- image: quay.io/pypa/manylinux1_i686
130-
<<: *build-wheel
131-
132-
manylinux-x86_cp37-cp37m:
133-
docker:
134-
- image: quay.io/pypa/manylinux1_i686
135-
<<: *build-wheel
62+
working_directory: ~/bencoder.pyx
63+
steps:
64+
- checkout
65+
- run:
66+
name: install dependencies
67+
command: |
68+
pip install -U pip setuptools wheel
69+
pip install -r dev-requirements.txt
70+
- run:
71+
name: test
72+
command: |
73+
pypy3 setup.py test
13674
13775
workflows:
13876
version: 2
@@ -142,37 +80,6 @@ workflows:
14280
- py35
14381
- py36
14482
- py37
83+
- py38
14584
- pypy
14685
- pypy3
147-
148-
- manylinux-x64_cp27-cp27m:
149-
requires:
150-
- py27
151-
- manylinux-x64_cp27-cp27mu:
152-
requires:
153-
- py27
154-
- manylinux-x64_cp35-cp35m:
155-
requires:
156-
- py35
157-
- manylinux-x64_cp36-cp36m:
158-
requires:
159-
- py36
160-
- manylinux-x64_cp37-cp37m:
161-
requires:
162-
- py37
163-
164-
- manylinux-x86_cp27-cp27m:
165-
requires:
166-
- py27
167-
- manylinux-x86_cp27-cp27mu:
168-
requires:
169-
- py27
170-
- manylinux-x86_cp35-cp35m:
171-
requires:
172-
- py35
173-
- manylinux-x86_cp36-cp36m:
174-
requires:
175-
- py36
176-
- manylinux-x86_cp37-cp37m:
177-
requires:
178-
- py37

.travis.yml

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,23 @@
1-
os: osx
2-
language: generic
1+
language: python
32
env:
43
global:
4+
- CIBW_BEFORE_BUILD="pip install -r build-requirements.txt"
5+
- CIBW_TEST_REQUIRES=pytest
6+
- CIBW_TEST_COMMAND="pytest {project}/tests"
57
- secure: "R5OivfMMAw1BhdwbBjEjfxhkqtj+Ntqf+jh+05Mr3y1aV8tC9J1vsq213Q7J7teweJ7WteHSj8ymJk2DdJ5mOIFEPAWQeuUIzcaplmfmsxYNdUhj19Ok8E8XG+ppBHccDaS3eE6GM6tDB9PouOE0MGA8/j9DLHXDSPTrjO/+G+AQ7V9M2+XqiEHJrPhlzas1h37XKLa5EzMIMK3atoUS1CLg6JOa+Rgz9OfXs+wQyErdQ5BjNfzZH4BKFhHl1zBViPv+j3SHDkyFw92mbXx14qn8xiyY3ZtKisMKT/X5o8DUJbWN3OdFF65NQq5lcnTFjIx06LJmy+zLjnZ83qggRuRPxAV2D9ODRBjDY3bdBMVSeaP/0yKldZyd14UXU3Ahwymi9lHC+MRgzRx5VyovptgOq3RfZ97peRT0NRDuotcxG1oFcAOIutH7oQZiAWZV7LLSSc3JdNCbwjRDm0MqzoD4TcMa8vCJMEZWSzLLygJYiZC0OklTnOYko5wdYms8aJw1FPjXbc2UNo6bVXXnbdoxEfadxtWKskNKF6tSdl766CMh/jM3gMv2bZkY2mYSnNp1RL1sslE33BZPgzW5fyFnUBskwQZEOidWx+uQ1eiPsnvb5FBC8on59fTVKkHh6Xiffqltq8Yvy33P12qoV+S9GHMT4DOm9bQf/qob2fQ="
6-
matrix:
7-
- VERSION=2.7
8-
- VERSION=3.5
9-
- VERSION=3.6
10-
- VERSION=3.7
118

12-
install:
13-
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then source ci/travis_osx_install.sh; fi
9+
matrix:
10+
include:
11+
- sudo: required
12+
services:
13+
- docker
14+
- os: osx
15+
language: generic
1416

1517
script:
16-
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then source ci/travis_osx_script.sh; fi
18+
- python -m pip install cibuildwheel==1.0.0 twine
19+
- cibuildwheel --output-dir wheelhouse
1720

1821
after_success:
1922
- ls wheelhouse/
20-
- if [ $TRAVIS_TAG ]; then source ci/deploy.sh; fi
23+
- if [ $TRAVIS_TAG ]; then twine upload --username whtsky --password $PYPI_PASSWORD wheelhouse/bencoder*.whl; fi

appveyor.yml

Lines changed: 8 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,12 @@ version: "{branch}-{build}"
22
cache:
33
- '%LOCALAPPDATA%\pip\Cache'
44
environment:
5+
CIBW_BEFORE_BUILD: "pip install -r build-requirements.txt"
6+
CIBW_TEST_REQUIRES: pytest
7+
CIBW_TEST_COMMAND: "pytest {project}/tests"
58
PYPI_PASSWD:
69
secure: pp1j5lAB9NN8ZDasgY+oxoGrNw0+4gGzbNZmHVwJkCzUyrNBP5ZIuCrwjmx4q6ifg7RMiE3bVt9MljFCJh3XpsvVOAcx+AGKsHSjtXd40HM=
710

8-
matrix:
9-
- PYTHON: "C:\\Python27"
10-
- PYTHON: "C:\\Python27-x64"
11-
- PYTHON: "C:\\Python35"
12-
- PYTHON: "C:\\Python35-x64"
13-
- PYTHON: "C:\\Python36"
14-
- PYTHON: "C:\\Python36-x64"
15-
- PYTHON: "C:\\Python37"
16-
- PYTHON: "C:\\Python37-x64"
17-
1811
init:
1912
- ps: "ls C:/Python*"
2013

@@ -23,24 +16,20 @@ install:
2316
- echo "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x64 > "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\amd64\vcvars64.bat"
2417
- pip install -r dev-requirements.txt
2518

26-
build: off
19+
build_script:
20+
- python -m pip install -U pip setuptools
21+
- pip install cibuildwheel==1.0.0
22+
- cibuildwheel --output-dir wheelhouse
2723

2824
test_script:
29-
- python -m pip install -U pip setuptools
3025
- pip install codecov
3126
- python setup.py test
3227
- codecov --required
3328

34-
after_test:
35-
- del bencoder.c
36-
- pip install wheel
37-
- pip wheel . -w wheelhouse/
38-
- ps: "ls wheelhouse/*"
39-
4029
deploy_script:
4130
- ps: >-
4231
if($env:appveyor_repo_tag -eq 'True') {
43-
$env:Path += ";C:\Python35;C:\Python35\scripts"
32+
$env:Path += ";C:\Python37;C:\Python37\scripts"
4433
pip install twine
4534
twine upload --username whtsky --password $env:PYPI_PASSWD wheelhouse/bencoder*.whl
4635
}

ci/build-wheels.sh

Lines changed: 0 additions & 24 deletions
This file was deleted.

ci/deploy.sh

Lines changed: 0 additions & 3 deletions
This file was deleted.

ci/travis_osx_install.sh

Lines changed: 0 additions & 5 deletions
This file was deleted.

ci/travis_osx_script.sh

Lines changed: 0 additions & 4 deletions
This file was deleted.

dev-requirements.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
-r test-requirements.txt
2-
-r tox-requirements.txt
1+
-r test-requirements.txt

release.sh

Lines changed: 0 additions & 8 deletions
This file was deleted.

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ def get_tag(self):
120120
'Programming Language :: Python :: 3.5',
121121
'Programming Language :: Python :: 3.6',
122122
'Programming Language :: Python :: 3.7',
123+
'Programming Language :: Python :: 3.8',
123124
'Programming Language :: Python :: Implementation :: CPython',
124125
'Programming Language :: Python :: Implementation :: PyPy',
125126
'Intended Audience :: Developers',

tox-requirements.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

tox-wheels.ini

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)