summaryrefslogtreecommitdiff
path: root/.travis.yml
blob: cf4765e5aa57f5f5f4a3c80c513770163a7f057e (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
dist: xenial
language: python
python: 3.7
cache: pip

env:
- TEST_CMD="pytest"

install:
  - pip install pytest pytest-cov
  - if [[ $TRAVIS_PYTHON_VERSION == 3.7 ]] && [[ "$TEST_CMD" == pytest* ]]; then
      pip install pytest pytest-cov 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:
- python setup.py develop
- $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