# Config file for automatic testing at travis-ci.org
dist: xenial

language: python

python:
  - 3.6
  - 3.7

os:
  - linux

cache:
  - pip

notifications:
  email: false

before_install:
  - sudo apt-get install jq
  - curl -LSs "$(curl -LSs https://api.github.com/repos/codacy/codacy-coverage-reporter/releases/latest | jq -r '.assets | map({name, browser_download_url} | select(.name | endswith(".jar"))) | .[0].browser_download_url')" -o codacy-coverage-reporter-assembly.jar

install:
  - pip install pytest-cov
  - pip install --quiet .[dev]

script:
  - flake8
  - black --check .
  - python setup.py check --restructuredtext
  - pytest --cov-report=xml --cov=scvi --internet-tests

after_success:
  - codecov
  - pip list
  - java -jar codacy-coverage-reporter-assembly.jar report -l Python -r coverage.xml

branches:
  only:
  - master

# Config file for automatic testing at travis-ci.org
dist: xenial

language: python

python:
  - 3.6
  - 3.7

os:
  - linux

cache:
  directories:
    - $HOME/.cache/pip
    - $HOME/.cache/codacy

notifications:
  email: false

install:
  - pip install pytest-cov
  - pip install --quiet .[dev]

script:
  - flake8
  - black --check .
  - python setup.py check --restructuredtext
  - pytest --cov-report=xml --cov=scvi --internet-tests

after_success:
  - codecov
  - pip list
  - bash <(curl -Ls https://coverage.codacy.com/get.sh) report -l Python -r coverage.xml

branches:
  only:
  - master

Update Codacy coverage reporter script
Update Codacy coverage reporter script

This changes codacy-coverage-reporter to the latest version
using the native binary for linux. It also adds the codacy cache
directory to travis cache so Travis can reuse the binary instead
of re-downloading every time.