Skip to content

Commit

Permalink
test: move integration tests into separate folder
Browse files Browse the repository at this point in the history
  • Loading branch information
eginhard committed Jan 29, 2025
1 parent 7036788 commit d920083
Show file tree
Hide file tree
Showing 10 changed files with 7 additions and 10 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,12 @@ jobs:
fail-fast: false
matrix:
python-version: ["3.10", "3.12"]
subset: ["test_tts", "test_tts2", "test_vocoder", "test_xtts"]
shard: [0, 1, 2, 3, 4]
steps:
- uses: actions/checkout@v4
- name: Setup uv
uses: ./.github/actions/setup-uv
- name: Install Espeak
if: contains(fromJSON('["test_tts", "test_tts2", "test_xtts"]'), matrix.subset)
run: |
sudo apt-get update
sudo apt-get install espeak espeak-ng
Expand All @@ -87,13 +86,17 @@ jobs:
if [[ -n "${{ github.event.inputs.coqpit_branch }}" ]]; then
uv add git+https://github.com/idiap/coqui-ai-coqpit --branch ${{ github.event.inputs.coqpit_branch }}
fi
- name: Integration tests
- name: Collect tests
run: uv run pytest tests/integration --collect-only --quiet > integration_tests.txt
- name: Integration tests for shard ${{ matrix.shard }}
run: |
total_shards=5
tests=$(awk "NR % $total_shards == ${{ matrix.shard }}" integration_tests.txt)
resolution=highest
if [ "${{ matrix.python-version }}" == "3.10" ]; then
resolution=lowest-direct
fi
uv run --resolution=$resolution --extra server --extra languages make ${{ matrix.subset }}
uv run --resolution=$resolution --extra languages pytest $tests
- name: Upload coverage data
uses: actions/upload-artifact@v4
with:
Expand Down
6 changes: 0 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,6 @@ test_vocoder: ## run vocoder tests.
test_tts: ## run tts tests.
coverage run -m pytest -x -v --durations=0 tests/tts_tests

test_tts2: ## run tts tests.
coverage run -m pytest -x -v --durations=0 tests/tts_tests2

test_xtts:
coverage run -m pytest -x -v --durations=0 tests/xtts_tests

test_aux: ## run aux tests.
coverage run -m pytest -x -v --durations=0 tests/aux_tests

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Empty file removed tests/tts_tests2/__init__.py
Empty file.

0 comments on commit d920083

Please sign in to comment.