зеркало из https://github.com/mozilla/TTS.git
Add a job to run unit tests
This commit is contained in:
Родитель
11e7895329
Коммит
4a24cff3a7
24
.travis.yml
24
.travis.yml
|
@ -1,17 +1,21 @@
|
|||
language: python
|
||||
|
||||
git:
|
||||
quiet: true
|
||||
|
||||
cache: pip
|
||||
before_cache:
|
||||
- rm ~/.cache/pip/log/debug.log
|
||||
|
||||
python:
|
||||
- "3.6"
|
||||
matrix:
|
||||
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:
|
||||
- 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
|
||||
script: ./.travis/script
|
||||
|
|
|
@ -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
|
Загрузка…
Ссылка в новой задаче