diff --git a/.github/workflows/main.yml b/.github/workflows/aux_tests.yml similarity index 93% rename from .github/workflows/main.yml rename to .github/workflows/aux_tests.yml index 68be9274..d5fe1bb3 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/aux_tests.yml @@ -1,4 +1,4 @@ -name: CI +name: aux-tests on: push: @@ -45,8 +45,5 @@ jobs: run: | python3 -m pip install .[all] python3 setup.py egg_info - - name: Lint check - run: | - make lint - name: Unit tests - run: make test + run: make test_aux diff --git a/.github/workflows/style_check.yml b/.github/workflows/style_check.yml new file mode 100644 index 00000000..4a30c26d --- /dev/null +++ b/.github/workflows/style_check.yml @@ -0,0 +1,50 @@ +name: style-check + +on: + push: + branches: + - main + pull_request: + types: [opened, synchronize, reopened] +jobs: + check_skip: + runs-on: ubuntu-latest + if: "! contains(github.event.head_commit.message, '[ci skip]')" + steps: + - run: echo "${{ github.event.head_commit.message }}" + + test: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + python-version: [3.9] + experimental: [false] + steps: + - uses: actions/checkout@v2 + - uses: actions/cache@v1 + with: + path: ~/.cache/pip + key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('**/setup.py') }} + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + architecture: x64 + - name: check OS + run: cat /etc/os-release + - name: Install dependencies + run: | + sudo apt update + sudo apt install -y git make + sudo apt install -y python3-wheel gcc + make system-deps + - name: Upgrade pip + run: python3 -m pip install --upgrade pip + - name: Install TTS + run: | + python3 -m pip install .[all] + python3 setup.py egg_info + - name: Lint check + run: | + make lint \ No newline at end of file diff --git a/.github/workflows/tts_tests.yml b/.github/workflows/tts_tests.yml new file mode 100644 index 00000000..d05dca90 --- /dev/null +++ b/.github/workflows/tts_tests.yml @@ -0,0 +1,49 @@ +name: tts-tests + +on: + push: + branches: + - main + pull_request: + types: [opened, synchronize, reopened] +jobs: + check_skip: + runs-on: ubuntu-latest + if: "! contains(github.event.head_commit.message, '[ci skip]')" + steps: + - run: echo "${{ github.event.head_commit.message }}" + + test: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + python-version: [3.6, 3.7, 3.8, 3.9] + experimental: [false] + steps: + - uses: actions/checkout@v2 + - uses: actions/cache@v1 + with: + path: ~/.cache/pip + key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('**/setup.py') }} + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + architecture: x64 + - name: check OS + run: cat /etc/os-release + - name: Install dependencies + run: | + sudo apt update + sudo apt install -y git make + sudo apt install -y python3-wheel gcc + make system-deps + - name: Upgrade pip + run: python3 -m pip install --upgrade pip + - name: Install TTS + run: | + python3 -m pip install .[all] + python3 setup.py egg_info + - name: Unit tests + run: make test_tts diff --git a/.github/workflows/vocoder_tests.yml b/.github/workflows/vocoder_tests.yml new file mode 100644 index 00000000..69e74dbf --- /dev/null +++ b/.github/workflows/vocoder_tests.yml @@ -0,0 +1,49 @@ +name: vocoder-tests + +on: + push: + branches: + - main + pull_request: + types: [opened, synchronize, reopened] +jobs: + check_skip: + runs-on: ubuntu-latest + if: "! contains(github.event.head_commit.message, '[ci skip]')" + steps: + - run: echo "${{ github.event.head_commit.message }}" + + test: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + python-version: [3.6, 3.7, 3.8, 3.9] + experimental: [false] + steps: + - uses: actions/checkout@v2 + - uses: actions/cache@v1 + with: + path: ~/.cache/pip + key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('**/setup.py') }} + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + architecture: x64 + - name: check OS + run: cat /etc/os-release + - name: Install dependencies + run: | + sudo apt update + sudo apt install -y git make + sudo apt install -y python3-wheel gcc + make system-deps + - name: Upgrade pip + run: python3 -m pip install --upgrade pip + - name: Install TTS + run: | + python3 -m pip install .[all] + python3 setup.py egg_info + - name: Unit tests + run: make test_vocoder diff --git a/Makefile b/Makefile index bffed7ff..c2091ca0 100644 --- a/Makefile +++ b/Makefile @@ -12,6 +12,15 @@ test_all: ## run tests and don't stop on an error. test: ## run tests. nosetests -x --with-cov -cov --cover-erase --cover-package TTS tests --nologcapture --with-id + +test_vocoder: ## run vocoder tests. + nosetests tests.vocoder_tests -x --with-cov -cov --cover-erase --cover-package TTS tests.vocoder_tests --nologcapture --with-id + +test_tts: ## run tts tests. + nosetests tests.tts_tests -x --with-cov -cov --cover-erase --cover-package TTS tests.tts_tests --nologcapture --with-id + +test_aux: ## run aux tests. + nosetests tests.aux_tests -x --with-cov -cov --cover-erase --cover-package TTS tests.aux_tests --nologcapture --with-id ./run_bash_tests.sh test_failed: ## only run tests failed the last time. diff --git a/tests/test_stft_torch.py b/tests/aux_tests/__init__.py similarity index 100% rename from tests/test_stft_torch.py rename to tests/aux_tests/__init__.py diff --git a/tests/model_manager.py b/tests/aux_tests/model_manager.py similarity index 100% rename from tests/model_manager.py rename to tests/aux_tests/model_manager.py diff --git a/tests/test_audio_processor.py b/tests/aux_tests/test_audio_processor.py similarity index 100% rename from tests/test_audio_processor.py rename to tests/aux_tests/test_audio_processor.py diff --git a/tests/test_extract_tts_spectrograms.py b/tests/aux_tests/test_extract_tts_spectrograms.py similarity index 100% rename from tests/test_extract_tts_spectrograms.py rename to tests/aux_tests/test_extract_tts_spectrograms.py diff --git a/tests/test_speaker_encoder.py b/tests/aux_tests/test_speaker_encoder.py similarity index 100% rename from tests/test_speaker_encoder.py rename to tests/aux_tests/test_speaker_encoder.py diff --git a/tests/test_speaker_encoder_train.py b/tests/aux_tests/test_speaker_encoder_train.py similarity index 100% rename from tests/test_speaker_encoder_train.py rename to tests/aux_tests/test_speaker_encoder_train.py diff --git a/tests/test_speaker_manager.py b/tests/aux_tests/test_speaker_manager.py similarity index 100% rename from tests/test_speaker_manager.py rename to tests/aux_tests/test_speaker_manager.py diff --git a/tests/aux_tests/test_stft_torch.py b/tests/aux_tests/test_stft_torch.py new file mode 100644 index 00000000..e69de29b diff --git a/tests/test_text_processing.py b/tests/aux_tests/test_text_processing.py similarity index 100% rename from tests/test_text_processing.py rename to tests/aux_tests/test_text_processing.py