language: python
python:
    - "2.7"

sudo: required
services:
  - docker

cache:
  - pip
  - directories:
    - node_modules
    - ecommerce/static/bower_components

addons:
    firefox: latest
    apt:
        packages:
            - lcov

before_install:
    - docker-compose -f ./.travis/docker-compose-travis.yml up -d

script:
    - docker exec ecommerce_testing /edx/app/ecommerce/ecommerce/.travis/run_tests.sh

after_success:
    - pip install -U codecov
    - docker exec ecommerce_testing /edx/app/ecommerce/ecommerce/.travis/run_coverage.sh
    - codecov
