# Use container system
sudo: false

# Cache pip & libsodium
cache:
  directories:
  - $HOME/libsodium
  - $HOME/.cache/pip

# Clean up pip log
before_cache:
  - rm -f $HOME/.cache/pip/log/debug.log

# Build matrix
language: python
matrix:
  include:
  - python: "3.4"
    env: EVENT_LOOP=asyncio
  - python: "3.5"
    env: EVENT_LOOP=asyncio
  - python: "3.5"
    env: EVENT_LOOP=uvloop
    before_script: "pip install .[uvloop]"

# Install dependencies
before_install:
  - ./.travis-install-libsodium.sh
  - export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${HOME}/libsodium/lib
install:
  - pip install -U setuptools pip
  - "pip install .[dev]"
  - pip install codecov

# Run flake8, isort, check docs & tests
script:
  - flake8 .
  - isort -rc -c . || (isort -rc -df . && return 1)
  - python setup.py checkdocs
  - py.test --cov-config .coveragerc --cov=saltyrtc --loop=$EVENT_LOOP

# After success
after_success:
  - codecov


# Use container system
sudo: false

# Cache pip & libsodium
cache:
  directories:
  - $HOME/libsodium
  - $HOME/.cache/pip

# Clean up pip log
before_cache:
  - rm -f $HOME/.cache/pip/log/debug.log

# Build matrix
language: python
matrix:
  include:
  - python: "3.4"
    env: EVENT_LOOP=asyncio
  - python: "3.5"
    env: EVENT_LOOP=asyncio
  - python: "3.5"
    env: EVENT_LOOP=uvloop
    before_script: "pip install .[uvloop]"

# Install dependencies
before_install:
  - ./.travis-install-libsodium.sh
  - export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${HOME}/libsodium/lib
install:
  - pip install -U setuptools pip
  - "pip install .[dev]"
  - pip install codecov

# Run flake8, isort, check docs & tests
script:
  - flake8 .
  - isort -rc -c . || (isort -rc -df . && return 1)
  - python setup.py checkdocs
  - py.test --cov-config .coveragerc --cov=saltyrtc.server --loop=$EVENT_LOOP

# After success
after_success:
  - codecov


Fix package in py.test invocation
Fix package in py.test invocation
