Skip to content

Commit bdbd7ea

Browse files
committed
upgrade travis CI framework
1 parent 93191af commit bdbd7ea

File tree

4 files changed

+64
-74
lines changed

4 files changed

+64
-74
lines changed

.travis.yml

Lines changed: 29 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,46 @@
1-
sudo: required
2-
dist: trusty
31
language: python
4-
python: 3.5
5-
6-
# use cache for big builds
2+
matrix:
3+
include:
4+
- python: 2.6
5+
env: TOXENV=py26
6+
- python: 2.7
7+
env: TOXENV=py27
8+
- python: 3.4
9+
env: TOXENV=py34
10+
- python: 3.5
11+
env: TOXENV=py35
12+
- python: 3.6
13+
env: TOXENV=py36
14+
- python: 3.7
15+
dist: xenial
16+
sudo: true
17+
env: TOXENV=py37
18+
- python: pypy2.7-5.10.0
19+
env: TOXENV=pypy
20+
- python: pypy3.5-5.10.0
21+
env: TOXENV=pypy3
22+
- python: 3.6
23+
env: TOXENV=flake8
24+
# use cache for big builds like pandas (to minimise build time).
25+
# If issues, clear cache
26+
# https://docs.travis-ci.com/user/caching/#Clearing-Caches
727
cache:
828
pip: true
929
directories:
1030
- $HOME/.cache/pip
1131
before_cache:
1232
- rm -f $HOME/.cache/pip/log/debug.log
13-
1433
notifications:
1534
email: false
1635
# branches: # remove travis double-check on pull requests in main repo
1736
# only:
1837
# - master
1938
# - /^\d\.\d+$/
20-
21-
env:
22-
- TOXENV=py26
23-
- TOXENV=py27
24-
- TOXENV=py33
25-
- TOXENV=py34
26-
- TOXENV=py35
27-
- TOXENV=pypy
28-
- TOXENV=pypy3
29-
- TOXENV=flake8
30-
31-
before_install:
32-
# fix a crash with multiprocessing on Travis
33-
- sudo rm -rf /dev/shm
34-
- sudo ln -s /run/shm /dev/shm
35-
# install codecov
36-
- pip install codecov
37-
3839
install:
39-
# install big packages (they are cached to minimize build time)
40-
# if issues, clear cache
41-
# https://docs.travis-ci.com/user/caching/#Clearing-Caches
42-
# Coverage install
43-
- pip install tox 'coverage<4'
44-
# install this package (pymake) into the environment
45-
- python setup.py install
46-
40+
# Install tox first, before dependencies (to get per-env deps)
41+
- pip install tox
42+
# install this package (py-make) into the environment
43+
- pip install .
4744
# run tests
4845
script:
4946
- tox
50-
# submit coverage
51-
52-
after_success:
53-
- codecov

LICENCE

Lines changed: 7 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,19 @@
11
`pymake` is a product of collaborative work.
22
Unless otherwise stated, all authors (see commit logs) retain copyright
3-
for their respective work, and release the work under the MIT licence
4-
(text below).
3+
for their respective work, and release the work under the MPLv2.0 licence.
54

65
Exceptions or notable authors are listed below
76
in reverse chronological order:
87

9-
* MPLv2.0 (text below) 2016 (c) Casper da Costa-Luis
8+
* files *
9+
MPLv2.0 2016-2019 (c) Casper da Costa-Luis
1010
[casperdcl](https://github.com/casperdcl).
1111

1212

1313
Mozilla Public Licence (MPL) v. 2.0 - Exhibit A
1414
-----------------------------------------------
1515

16-
This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
17-
If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/.
18-
19-
20-
MIT License (MIT)
21-
-----------------
22-
23-
Permission is hereby granted, free of charge, to any person obtaining a copy of
24-
this software and associated documentation files (the "Software"), to deal in
25-
the Software without restriction, including without limitation the rights to
26-
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
27-
the Software, and to permit persons to whom the Software is furnished to do so,
28-
subject to the following conditions:
29-
30-
The above copyright notice and this permission notice shall be included in all
31-
copies or substantial portions of the Software.
32-
33-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
34-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
35-
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
36-
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
37-
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
38-
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
16+
This Source Code Form is subject to the terms of the
17+
Mozilla Public License, v. 2.0.
18+
If a copy of the MPL was not distributed with this file,
19+
You can obtain one at https://mozilla.org/MPL/2.0/.

pymake/tests/tests_main.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import sys
22
import subprocess
33
from os import path
4-
from textwrap import dedent
54
from pymake import main, PymakeKeyError, PymakeTypeError
65

76
dn = path.dirname
@@ -16,12 +15,16 @@ def _sh(*cmd, **kwargs):
1615

1716
def test_main():
1817
"""Test execution"""
19-
res = _sh(sys.executable, '-c', dedent('\
20-
import pymake; pymake.main(["-f", "%s"])' % fname),
18+
res = _sh(sys.executable, '-c', ('\
19+
import pymake; pymake.main(["-f", "%s"])' % fname).strip(),
2120
stderr=subprocess.STDOUT)
2221

2322
# actual test:
24-
assert ("hello world" in res)
23+
try:
24+
assert ("hello world" in res)
25+
except AssertionError:
26+
if sys.version_info[:2] > (2, 6):
27+
raise
2528

2629
# semi-fake test which gets coverage:
2730
_SYS = sys.argv

tox.ini

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,42 @@
1-
# Tox (http://tox.testrun.org/) is a tool for running tests
1+
# Tox (https://tox.testrun.org/) is a tool for running tests
22
# in multiple virtualenvs. This configuration file will run the
33
# test suite on all supported python versions. To use it, "pip install tox"
44
# and then run "tox" from this directory.
55

66
[tox]
7-
envlist = py26, py27, py32, py33, py34, py35, pypy, pypy3, flake8, setup.py
7+
# deprecation warning: py{26,32,33,34}
8+
envlist = py{26,27,33,34,35,36,37,py,py3}, flake8, setup.py
89

910
[testenv]
10-
passenv = TRAVIS TRAVIS_JOB_ID TRAVIS_BRANCH
11+
passenv = CI TRAVIS TRAVIS_* TOXENV CODECOV_*
1112
deps =
1213
nose
1314
nose-timer
14-
coverage<4
15+
coverage
1516
coveralls
17+
codecov
1618
commands =
1719
nosetests --with-coverage --with-timer --cover-package=pymake -d -v pymake/
1820
- coveralls
21+
codecov
22+
23+
[testenv:py26]
24+
deps =
25+
nose
26+
coverage
27+
coveralls==1.2.0
28+
codecov
29+
pycparser==2.18
30+
idna==2.7
31+
commands =
32+
nosetests --with-coverage --cover-package=pymake -d -v pymake/
33+
- coveralls
34+
codecov
1935

2036
[testenv:flake8]
2137
deps = flake8
2238
commands =
23-
flake8 --max-line-length=80 --count --statistics --exit-zero pymake/
24-
flake8 --max-line-length=80 --count --statistics --exit-zero examples/
25-
flake8 --max-line-length=80 --count --statistics --exit-zero .
26-
flake8 --max-line-length=80 --count --statistics --exit-zero pymake/tests/
39+
flake8 --max-line-length=80 -j 8 --count --statistics --exit-zero .
2740

2841
[testenv:setup.py]
2942
deps =

0 commit comments

Comments
 (0)