language: python
cache: pip
python:
  - "3.4"
  - "3.5"
  - "3.6"

install:
  - pip install .[dev]

script:
  - cd tests
  - py.test

jobs:
  include:
    - stage: compliance
      script: pre-commit run --all-files

stages:
  - compliance
  - test

language: python
cache: pip
python:
  - "3.4"
  - "3.5"
  - "3.6"

env:
  - TEST_TYPE="test"

matrix:
  include:
    - python: 3.6
      env: TEST_TYPE="compliance"

install:
  - pip install .[dev]

script:
  - if [ "$TEST_TYPE" == "compliance" ] ; then pre-commit run --all-files ; fi
  - if [ "$TEST_TYPE" == "test" ] ; then cd tests; py.test ; fi

Use test type environment variable instead of stages
Use test type environment variable instead of stages
