summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Willhaus <mail@janwillhaus.de>2019-05-19 10:45:59 +0200
committerJan Willhaus <mail@janwillhaus.de>2019-05-19 18:38:59 +0200
commita8c68c71f4084a2c3df717a4e0b4d6b9eaed7262 (patch)
treecee29abde793d51ce48e8a011e0da928bd013ec7
parentc554d62f9ff2e7c94dafa933d91191faf661146d (diff)
downloadwarlock-a8c68c71f4084a2c3df717a4e0b4d6b9eaed7262.tar.gz
Replace Travis matrix with job list
-rw-r--r--.travis.yml45
1 files changed, 25 insertions, 20 deletions
diff --git a/.travis.yml b/.travis.yml
index e2d0aa3..3fbbf14 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,33 +1,25 @@
dist: xenial
language: python
python: 3.7
-cache: pip
+cache:
+ pip: true
+ directories:
+ - "$HOME/.cache/pypoetry"
-env:
- - TEST_CMD="poetry run pytest"
+stages:
+ - linting
+ - test
install:
- - if [[ "$TEST_CMD" == pytest* ]]; then pip install poetry && poetry --no-interaction install; fi
- - if [[ "$TEST_CMD" == pytest* ]] && [[ $TRAVIS_PYTHON_VERSION == 3.7 ]]; then
- pip install coveralls; fi
- - if [[ $TEST_CMD == black* ]]; then pip install black; fi
- - if [[ $TEST_CMD == flake8* ]]; then pip install flake8 flake8-bugbear flake8-todo; fi
+ - curl -sSL https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py | python - -y
+ - source $HOME/.poetry/env
+ - poetry --no-interaction install -v
script:
- - $TEST_CMD
+ - pytest
-after_success:
- - if [[ $TRAVIS_PYTHON_VERSION == 3.7 ]] && [[ "$TEST_CMD" == pytest* ]];
- then coveralls; fi
-
-matrix:
+jobs:
include:
- - name: "black"
- env:
- - TEST_CMD="black --check --verbose ."
- - name: "flake8"
- env:
- - TEST_CMD="flake8 warlock"
- name: "pytest-py2.7"
python: 2.7
- name: "pytest-py3.4"
@@ -38,3 +30,16 @@ matrix:
python: 3.6
- name: "pytest-py3.7"
python: 3.7
+ before_script:
+ - pip install coveralls
+ after_success:
+ - coveralls
+
+
+ - stage: linting
+ python: 3.7
+ install:
+ - pip install -U black flake8 flake8-bugbear flake8-todo
+ script:
+ - black --check --verbose .
+ - flake8 warlock