Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce github action for CI #572

Merged
merged 3 commits into from
Dec 8, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Test

on:
push:
pull_request:
types: [opened, synchronize, reopened]

jobs:
test:

runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: [3.6, 3.7, 3.8]

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
sudo apt update
sudo apt install espeak git
- name: Upgrade pip
# so we can take advantage of pyproject.toml build-dependency support
run: python3 -m pip install --upgrade pip
- name: Install TTS
run: |
python3 -m pip install .
python3 setup.py egg_info
- name: Lint check
run: |
python3 -m pip install --quiet --upgrade cardboardlint pylint
cardboardlinter --refspec ${GITHUB_BASE_REF} -n auto
- name: Unit tests
run: nosetests tests --nocapture
- name: Test scripts
run: |
./tests/test_server_package.sh
./tests/test_glow-tts_train.sh
./tests/test_server_package.sh
./tests/test_tacotron_train.sh
./tests/test_vocoder_gan_train.sh
./tests/test_vocoder_wavegrad_train.sh
./tests/test_vocoder_wavernn_train.sh

32 changes: 0 additions & 32 deletions .travis.yml

This file was deleted.

22 changes: 0 additions & 22 deletions .travis/script

This file was deleted.

2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[build-system]
requires = ["setuptools", "wheel", "Cython", "numpy>=1.16.0,<1.20"]
7 changes: 4 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
torch>=1.5
tensorflow==2.3.1
numpy>=1.16.0
numpy>=1.16.0; python_version >= "3.7"
numpy>=1.16.0,<1.20; python_version < "3.7"
scipy>=0.19.0
numba==0.48
librosa==0.7.2
Expand All @@ -18,8 +19,8 @@ pysbd
pyworld
soundfile
nose==1.3.7
cardboardlint==1.3.0
pylint==2.5.3
cardboardlint
pylint
gdown
umap-learn
cython
Expand Down
16 changes: 9 additions & 7 deletions tests/test_server_package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,26 @@ if [[ ! -f tests/outputs/checkpoint_10.pth.tar ]]; then
fi

rm -f dist/*.whl
python setup.py --quiet bdist_wheel --checkpoint tests/outputs/checkpoint_10.pth.tar --model_config tests/outputs/dummy_model_config.json
python3 setup.py --quiet bdist_wheel --checkpoint tests/outputs/checkpoint_10.pth.tar --model_config tests/outputs/dummy_model_config.json
erogol marked this conversation as resolved.
Show resolved Hide resolved

python -m venv /tmp/venv
python3 -m venv /tmp/venv
source /tmp/venv/bin/activate
pip install --quiet --upgrade pip setuptools wheel
pip install --quiet dist/TTS*.whl
python3 -m pip install --quiet --upgrade pip setuptools wheel cython
# wait to install numpy until we have wheel support
python3 -m pip install numpy
python3 -m pip install --quiet dist/TTS*.whl

# this is related to https://github.com/librosa/librosa/issues/1160
pip install numba==0.48
python3 -m pip install numba==0.48

python -m TTS.server.server &
python3 -m TTS.server.server &
SERVER_PID=$!

echo 'Waiting for server...'
sleep 30

curl -o /tmp/audio.wav "http://localhost:5002/api/tts?text=synthesis%20schmynthesis"
python -c 'import sys; import wave; print(wave.open(sys.argv[1]).getnframes())' /tmp/audio.wav
python3 -c 'import sys; import wave; print(wave.open(sys.argv[1]).getnframes())' /tmp/audio.wav

kill $SERVER_PID

Expand Down