summaryrefslogtreecommitdiff
path: root/.travis.yml
blob: 394e7193e8aa4e16beab0e36fe4702c4ff69e64f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
dist: xenial
language: python
python: 3.7
cache: pip

env:
  - TEST_CMD="poetry run pytest"

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

script:
  - $TEST_CMD

after_success:
  - if [[ $TRAVIS_PYTHON_VERSION == 3.7 ]] && [[ "$TEST_CMD" == pytest* ]];
     then coveralls; fi

matrix:
  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"
      python: 3.4
    - name: "pytest-py3.5"
      python: 3.5
    - name: "pytest-py3.6"
      python: 3.6
    - name: "pytest-py3.7"
      python: 3.7