Skip to content

Commit

Permalink
Refactor Travis configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
hvelarde committed Aug 10, 2018
1 parent c242efc commit acfa138
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 29 deletions.
47 changes: 19 additions & 28 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,47 +1,38 @@
language: python
python: 2.7
sudo: false
cache:
pip: true
directories:
- $HOME/buildout-cache
- $HOME/.pylint.d
- eggs

global:
- secure: "nTXMNU2aYbCtvKD74PndF8Xm2h6IvsxPjr6vj45AxjXmaB7Wf5oGi/4b6ObV\nexBtUQkFnc+M0ThGyUznOCPi3YxcbTzsyhQYhHUtmtw/6QRyYgo4E0GLDItU\n37Ff6wpxl3NMMJTvpi6SOVUvIJUl3+cs+4bkMkS48RSFGg2rGmo=" # Coveralls.io token
env:
matrix:
- PLONE_VERSION=4.3
- PLONE_VERSION=5.0
- PLONE_VERSION=5.1
matrix:
fast_finish: true
include:
# pyXX-plone_sunburst,pyXX-plone_barceloneta
- python: "2.7"
env: TOXENV=py27-plone-4.3
- python: "2.7"
env: TOXENV=py27-plone-5.0
- python: "2.7"
env: TOXENV=py27-plone-5.1
- python: "2.7"
env: TOXENV=isort,flake8,docs,

before_install:
- mkdir -p $HOME/buildout-cache/{downloads,eggs,extends}
- mkdir $HOME/.buildout
- echo "[buildout]" > $HOME/.buildout/default.cfg
- echo "download-cache = $HOME/buildout-cache/downloads" >> $HOME/.buildout/default.cfg
- echo "eggs-directory = $HOME/buildout-cache/eggs" >> $HOME/.buildout/default.cfg
- echo "extends-cache = $HOME/buildout-cache/extends" >> $HOME/.buildout/default.cfg
- echo "abi-tag-eggs = true" >> $HOME/.buildout/default.cfg

install:
- travis_retry pip install -U setuptools==33.1.1 tox coveralls coverage

before_script:
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
- sed -ie "s#test-5.1#test-$PLONE_VERSION#" buildout.cfg
- pip install -U -r https://raw.githubusercontent.com/plone/buildout.coredev/$PLONE_VERSION/requirements.txt
- buildout annotate
- buildout

script:
- travis_retry tox
- bin/code-analysis
- bin/test
- bin/pylint --py3k --disable=no-absolute-import src/plone/api || true

after_success:
- coverage combine
- coveralls
- pip install coverage
- coverage run bin/test
- pip install coveralls
- coveralls

notifications:
irc:
Expand Down
24 changes: 23 additions & 1 deletion buildout.cfg
Original file line number Diff line number Diff line change
@@ -1,2 +1,24 @@
[buildout]
extends = plone-5.1.x.cfg
extends =
https://raw.github.com/collective/buildout.plonetest/master/test-5.1.x.cfg

package-name = plone.api
package-extras = [test]

parts +=
code-analysis
pylint

[code-analysis]
recipe = plone.recipe.codeanalysis
directory = src/plone/api
pre-commit-hook = True
flake8 = True
return-status-codes = True

[pylint]
recipe = zc.recipe.egg
eggs = pylint < 2.0

[versions]
plone.recipe.zope2instance = 4.4.0

0 comments on commit acfa138

Please sign in to comment.