split CI to stages
+stages:
+- style
+- test
+- coverage
+
+jobs:
+ include:
+ - stage: style
language: python
-python:
- - 2.7
- - 3.6
+ python: 2.7
install:
- pip install -U pip
- - pip install -U coveralls pycodestyle pytest-mccabe pytest-random
+ - pip install -U coveralls pycodestyle
before_script:
- pip install -Ur requirements.txt
- python2 -V
+ env:
+ - NAME="Style"
+ script:
+ - pycodestyle moler
+ - stage: style
+ language: python
+ python: 3.6
+ install:
+ - pip install -U pip
+ - pip install -U coveralls pycodestyle
+ before_script:
+ - pip install -Ur requirements.txt
- python3 -V
+ env:
+ - NAME="Style"
script:
- - coverage run -m py.test --random
- pycodestyle moler
- - if [[ $TRAVIS_PYTHON_VERSION == 3.6 ]]; then python3.6 -m pytest --mccabe moler; fi
- - if [[ $TRAVIS_PYTHON_VERSION == 2.7 ]]; then python2.7 -m pytest --mccabe moler; fi
+ - stage: test
+ language: python
+ python: 2.7
+ install:
+ - pip install -U pip
+ - pip install -U coveralls pytest-mccabe pytest-random
+ before_script:
+ - pip install -Ur requirements.txt
+ - python2 -V
+ env:
+ - NAME="Test"
+ script:
+ - python2.7 -m pytest --mccabe moler
+ - coverage run -m py.test --random -s -vv
+ - stage: test
+ language: python
+ python: 3.6
+ install:
+ - pip install -U pip
+ - pip install -U coveralls pytest-mccabe pytest-random
+ before_script:
+ - pip install -Ur requirements.txt
+ - python3 -V
+ env:
+ - NAME="Test"
+ script:
+ - python3.6 -m pytest --mccabe moler
+ - stage: coverage
+ language: python
+ python: 3.6
+ install:
+ - pip install -U pip
+ - pip install -U coveralls pytest-mccabe pytest-random
+ before_script:
+ - pip install -Ur requirements.txt
+ - python3 -V
+ env:
+ - NAME="Coverage"
+ script:
+ - coverage run -m py.test --random -s -vv
after_success:
- - if [[ $TRAVIS_PYTHON_VERSION == 3.6 && $TRAVIS_OS_NAME == "linux" ]]; then coveralls; fi
+ - coveralls
