Skip to content

Commit

Permalink
Travis: test on more Python and Plone versions.
Browse files Browse the repository at this point in the history
Do code-analysis separately, only on Plone 5.2 with Python 3.7.
Too often in other add-ons with Plone 4.3 the buildout fails because bin/code-analysis cannot be generated,
even though bin/test would have passed just fine.
  • Loading branch information
mauritsvanrees committed Sep 16, 2019
1 parent 33d7270 commit c8b82ae
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 8 deletions.
32 changes: 25 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,38 @@
dist: bionic
language: python
sudo: false
cache:
pip: true
directories:
- eggs
- downloads
- buildout-cache
python:
- "2.7"
matrix:
include:
- python: "2.7"
env: PLONE_VERSION="4.3" PART="test"
- python: "2.7"
env: PLONE_VERSION="5.1" PART="test"
- python: "2.7"
env: PLONE_VERSION="5.2" PART="test"
- python: "3.7"
env: PLONE_VERSION="5.2" PART="test"
- python: "3.7"
env: PLONE_VERSION="5.2" PART="code-analysis"
sudo: true
fast_finish: true
install:
before_install:
- virtualenv -p `which python` .
- mkdir -p $HOME/buildout-cache/{eggs,downloads}
- 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
- virtualenv -p `which python` .
- bin/pip install -r requirements.txt
- sed -ie "s#5.1-latest#$PLONE_VERSION-latest#" buildout.cfg
- bin/buildout -N buildout:download-cache=downloads code-analysis:return-status-codes=True annotate
- bin/buildout -N buildout:download-cache=downloads code-analysis:return-status-codes=True
install:
- bin/buildout -N buildout:download-cache=downloads code-analysis:return-status-codes=True install $PART
script:
- bin/test
after_success:
- bin/code-analysis
- bin/$PART
2 changes: 1 addition & 1 deletion buildout.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[buildout]
extends = http://dist.plone.org/release/5.1.5/versions.cfg
extends = https://dist.plone.org/release/5.1-latest/versions.cfg
show-picked-versions = true
extensions =
mr.developer
Expand Down

0 comments on commit c8b82ae

Please sign in to comment.