workspace:
  base: /app
  path: .

pipeline:
  test:
    image: python:3.5
    environment:
      - PYTHONPATH=/app:$PYTHONPATH
      - CI_BRANCH=${DRONE_COMMIT_BRANCH}
    commands:
      - pip install -r requirements.txt
      - pip install -r requirements-dev.txt
      - export CI_BRANCH=${DRONE_COMMIT_BRANCH}
      - export CI_NAME='Drone'
      - export CI_BUILD_NUMBER=${DRONE_BUILD_NUMBER}
      - export CI_BUILD_URL=${DRONE_BUILD_LINK}
      - export CI_PULL_REQUEST=${DRONE_PULL_REQUEST}
      - coverage run -m unittest discover
      - coverage report -m
      - coveralls
    secrets: [ coveralls_repo_token ]
  code-standards:
    image: python:3.5
    environment:
      - PYTHONPATH=/app:$PYTHONPATH
    commands:
      - pip install -r requirements.txt
      - pip install -r requirements-dev.txt
      - flake8
      - find . -iname "*.py" | xargs pylint
    when:
      event: push
      branch: master

workspace:
  base: /app
  path: .

pipeline:
  test:
    image: python:3.5
    environment:
      - PYTHONPATH=/app:$PYTHONPATH
      - CI_BRANCH=${DRONE_COMMIT_BRANCH}
    commands:
      - pip install -r requirements.txt
      - pip install -r requirements-dev.txt
      - export CI_BRANCH=${DRONE_COMMIT_BRANCH}
      - export CI_NAME='Drone'
      - export CI_BUILD_NUMBER=${DRONE_BUILD_NUMBER}
      - export CI_BUILD_URL=${DRONE_BUILD_LINK}
      - export CI_PULL_REQUEST=${DRONE_PULL_REQUEST}
      - coverage run -m unittest discover
      - coverage report -m
      - coveralls
    secrets: [ coveralls_repo_token ]
  code-standards:
    image: python:3.5
    environment:
      - PYTHONPATH=/app:$PYTHONPATH
    commands:
      - pip install -r requirements.txt
      - pip install -r requirements-dev.txt
      - flake8
      - find . -iname "*.py" | xargs pylint

Check code standards on every build
Check code standards on every build
