Skip to content

Commit 1afb3a8

Browse files
authored
Merge pull request scalative#175 from itziakos/update-ci
Update ci
2 parents 72c0521 + 3bc76a8 commit 1afb3a8

File tree

9 files changed

+165
-39
lines changed

9 files changed

+165
-39
lines changed

.travis.yml

Lines changed: 59 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,70 @@
11
language: python
22

3+
env:
4+
global:
5+
PYTHONUNBUFFERED="1"
6+
37
matrix:
48
include:
5-
- python: 2.6
6-
sudo: false
7-
- python: 2.7
8-
sudo: false
9-
- python: 3.3
10-
sudo: false
11-
- python: 3.4
12-
sudo: false
13-
- python: 3.5
14-
sudo: false
15-
- python: pypy
16-
sudo: required
17-
dist: trusty
18-
- python: pypy3
19-
sudo: required
20-
dist: trusty
21-
22-
install:
23-
- if [[ $TRAVIS_PYTHON_VERSION == '2.6' ]]; then pip install unittest2 ; fi
24-
- pip install coverage
25-
- pip install coveralls
26-
- python setup.py develop
27-
- pip install -r test_requirements.txt
9+
- python: "2.6"
10+
env: TOXENV="cp26"
11+
- python: "2.7"
12+
env: TOXENV="cp27"
13+
- python: "3.3"
14+
env: TOXENV="cp33"
15+
- python: "3.4"
16+
env: TOXENV="cp34"
17+
- python: "3.5"
18+
env: TOXENV="cp35"
19+
- python: "3.6"
20+
env: TOXENV="cp36"
21+
- dist: xenial
22+
python: "3.7"
23+
env: TOXENV="cp37"
24+
- python: "pypy"
25+
env: TOXENV="pp2"
26+
- python: "pypy3"
27+
env: TOXENV="pp3"
28+
- os: osx
29+
language: shell
30+
env: TOXPY27="/usr/local/bin/python2" TOXENV="cp27"
31+
python: "2.7"
32+
- os: osx
33+
language: shell
34+
env: TOXPY36="/usr/local/bin/python3" TOXENV="cp36"
35+
python: "3.6"
36+
37+
allow_failures:
38+
- os: osx
39+
40+
cache:
41+
directories:
42+
- $HOME/.cache/pip
43+
- $HOME/Library/Caches/Homebrew
2844

29-
script:
30-
- if [[ $TRAVIS_PYTHON_VERSION == '2.6' ]]; then coverage run --branch -m unittest2.__main__ discover -v -t . haas; fi
31-
- if [[ $TRAVIS_PYTHON_VERSION != '2.6' ]]; then coverage run --branch -m unittest discover -v -t . haas; fi
32-
- if [[ $TRAVIS_PYTHON_VERSION == '2.6' ]]; then python -m haas.__main__; fi
33-
- if [[ $TRAVIS_PYTHON_VERSION != '2.6' ]]; then python -m haas; fi
45+
branches:
46+
only:
47+
- master
48+
- /^maintenance\/.*$/
49+
- /^v\d+\.\d+\.\d+.*$/
50+
51+
addons:
52+
homebrew:
53+
packages:
54+
- python@2
55+
- python@3
56+
57+
before_cache:
58+
- brew cleanup
59+
60+
install: pip install -q -rtox-requirements.txt
61+
script: tox -v
3462

3563
notifications:
3664
email:
3765
3866

3967
after_success:
40-
coveralls
68+
- if [[ $TRAVIS_PYTHON_VERSION == '2.6' ]]; then pip install "idna < 2.8"; fi
69+
- pip install coveralls
70+
- coveralls

appveyor-cache.txt

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

appveyor.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
build: false
2+
shallow_clone: true
3+
skip_branch_with_pr: true
4+
image: Visual Studio 2015
5+
6+
environment:
7+
8+
pythonunbuffered: "1"
9+
toxenv: "cp27,cp33,cp34,cp35,cp36,cp37"
10+
11+
matrix:
12+
- TOXPY26: "C:/Python26-x64/python.exe"
13+
TOXPY27: "C:/Python27-x64/python.exe"
14+
TOXPY33: "C:/Python33-x64/python.exe"
15+
TOXPY34: "C:/Python34-x64/python.exe"
16+
TOXPY35: "C:/Python35-x64/python.exe"
17+
TOXPY36: "C:/Python36-x64/python.exe"
18+
TOXPY37: "C:/Python37-x64/python.exe"
19+
PYTHON: "C:/Python33-x64"
20+
- TOXPY26: "C:/Python26/python.exe"
21+
TOXPY27: "C:/Python27/python.exe"
22+
TOXPY33: "C:/Python33/python.exe"
23+
TOXPY34: "C:/Python34/python.exe"
24+
TOXPY35: "C:/Python35/python.exe"
25+
TOXPY36: "C:/Python36/python.exe"
26+
TOXPY37: "C:/Python37/python.exe"
27+
PYTHON: "C:/Python33"
28+
29+
matrix:
30+
fast_finish: true
31+
32+
branches:
33+
only:
34+
- master
35+
36+
cache:
37+
- C:\Users\appveyor\AppData\Local\pip\Cache -> appveyor-cache.txt
38+
39+
init:
40+
- ps: $Env:path = $Env:PYTHON + ";" + $Env:PYTHON + "/Scripts;" + $Env:path
41+
install:
42+
- cmd: python -m pip install -rtox-requirements.txt
43+
test_script:
44+
- python -m tox -v
45+
on_success:
46+
- python -m pip install codecov
47+
- python -m codecov

cp33-tox-requirements.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
pip < 11.0.0; python_version == '3.3'
2+
wheel <= 0.29; python_version == '3.3'
3+
setuptools < 40.0.0; python_version == '3.3'

haas/tests/test_parallel_runner.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def test_basic_workflow(self, stdout, stderr):
7474

7575
# Then
7676
self.assertGreaterEqual(handler.start_time, start_time)
77-
self.assertLess(handler.start_time, stop_time)
77+
self.assertLessEqual(handler.start_time, stop_time)
7878
self.assertGreaterEqual(handler.stop_time, stop_time)
7979
self.assertEqual(handler.results, [test_result])
8080

test_requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
coverage
2+
unittest2; python_version == '2.6'
23
mock
34
six
45
testfixtures

test_requirements32.txt

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

tox-requirements.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
tox < 3.0.0; python_version == '3.3'
2+
tox; python_version != '3.3'
3+
virtualenv == 15.2.0; python_version == '3.3'

tox.ini

Lines changed: 50 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,54 @@
11
[tox]
2-
envlist = py26,py27,py33,py34,py35,py36,py37,pypy
2+
envlist = cp{26,27,33,34,35},pp{2,3},cp26-win
3+
minversion=2.7
34

45
[testenv]
5-
deps = -rtest_requirements.txt
6-
commands = python -m unittest discover -v
7-
passenv = LANG LOCALE_ARCHIVE
6+
recreate = True
7+
# We use python -m to avoid issues on windows when upgradin pip
8+
# We use -q to avoid issues with unicode errors in the progress bar
9+
install_command = python -m pip install -q {packages}
10+
passenv =
11+
SHOW_TEST_ENV
12+
PYTHONUNBUFFERED
13+
LANG
14+
LOCALE_ARCHIVE
15+
basepython =
16+
cp26: {env:TOXPY26:python2.6}
17+
cp26-win: {env:TOXPY26:python2.6}
18+
cp27: {env:TOXPY27:python2.7}
19+
cp33: {env:TOXPY33:python3.3}
20+
cp34: {env:TOXPY34:python3.4}
21+
cp35: {env:TOXPY35:python3.5}
22+
cp36: {env:TOXPY36:python3.6}
23+
cp37: {env:TOXPY37:python3.7}
24+
pp2: {env:TOXPYPY:pypy}
25+
pp3: {env:TOXPYPY3:pypy3}
826

9-
[testenv:py26]
10-
commands = python -m unittest2.__main__ discover -v
27+
commands =
28+
pip install -q -rtest_requirements.txt
29+
pip --version
30+
coverage run --branch -m unittest discover -v -t . haas
31+
python -m haas haas
32+
33+
[testenv:cp26-win]
34+
install_command = python -m pip --trusted-host pypi.org --trusted-host pypi.python.org install {packages}
35+
commands =
36+
pip install -q -rtest_requirements.txt
37+
pip --version
38+
coverage run --branch -m unittest2.__main__ discover -v -t . haas
39+
python -m haas.__main__ haas
40+
41+
[testenv:cp26]
42+
# Python 2.6 needs some handholding to run the entry points using the
43+
# `-m` option.
44+
install_command = python -m pip.__main__ install -q {packages}
45+
commands =
46+
pip install -q -rtest_requirements.txt
47+
pip --version
48+
coverage run --branch -m unittest2.__main__ discover -v -t . haas
49+
python -m haas.__main__ haas
50+
51+
[testenv:cp33]
52+
# The tox environment for cp33 needs a specific set of base
53+
# dependencies for wheel, pip and setuptools
54+
deps = -rcp33-tox-requirements.txt

0 commit comments

Comments
 (0)