mirror of https://github.com/coqui-ai/TTS.git
Add a job to run unit tests
This commit is contained in:
parent
11e7895329
commit
4a24cff3a7
24
.travis.yml
24
.travis.yml
|
@ -1,17 +1,21 @@
|
||||||
language: python
|
language: python
|
||||||
|
|
||||||
|
git:
|
||||||
|
quiet: true
|
||||||
|
|
||||||
cache: pip
|
cache: pip
|
||||||
before_cache:
|
before_cache:
|
||||||
- rm ~/.cache/pip/log/debug.log
|
- rm ~/.cache/pip/log/debug.log
|
||||||
|
|
||||||
python:
|
matrix:
|
||||||
- "3.6"
|
include:
|
||||||
|
- name: "Lint check"
|
||||||
|
python: "3.6"
|
||||||
|
install: pip install --quiet --upgrade cardboardlint pylint
|
||||||
|
env: TEST_SUITE="lint"
|
||||||
|
- name: "Unit tests"
|
||||||
|
python: "3.6"
|
||||||
|
install: pip install --quiet -r requirements.txt
|
||||||
|
env: TEST_SUITE="unittest"
|
||||||
|
|
||||||
install:
|
script: ./.travis/script
|
||||||
- pip install --upgrade cardboardlint pylint
|
|
||||||
|
|
||||||
script:
|
|
||||||
# Run cardboardlinter, in case of pull requests
|
|
||||||
- if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
|
|
||||||
cardboardlinter --refspec $TRAVIS_BRANCH -n auto;
|
|
||||||
fi
|
|
||||||
|
|
|
@ -0,0 +1,12 @@
|
||||||
|
#!/bin/bash
|
||||||
|
set -ex
|
||||||
|
|
||||||
|
if [[ ( "$TRAVIS_PULL_REQUEST" != "false" ) && ( "$TEST_SUITE" == "lint" ) ]]; then
|
||||||
|
# Run cardboardlinter, in case of pull requests
|
||||||
|
cardboardlinter --refspec $TRAVIS_BRANCH -n auto
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "$TEST_SUITE" == "unittest" ]]; then
|
||||||
|
# Run tests on all pushes
|
||||||
|
python -m unittest
|
||||||
|
fi
|
Loading…
Reference in New Issue