Added integration test covering real execution with all model architectures #7
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: run-integration-tests | |
| on: | |
| pull_request: | |
| jobs: | |
| integration-test: | |
| runs-on: self-hosted | |
| env: | |
| AUDIO_SEPARATOR_MODEL_DIR: ${{ github.workspace }}/models | |
| steps: | |
| - name: Checkout project | |
| uses: actions/checkout@v4 | |
| - name: Install poetry | |
| run: pipx install poetry | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.13' | |
| cache: poetry | |
| - name: Create models directory | |
| run: mkdir -p $AUDIO_SEPARATOR_MODEL_DIR | |
| - name: Cache models directory | |
| uses: actions/cache@v3 | |
| id: model-cache | |
| with: | |
| path: ${{ env.AUDIO_SEPARATOR_MODEL_DIR }} | |
| key: model-cache-${{ hashFiles('tests/integration/test_cli_integration.py') }} | |
| restore-keys: model-cache- | |
| - name: Install Poetry dependencies | |
| run: poetry install -E cpu | |
| - name: Display model cache status | |
| run: | | |
| echo "Model cache hit: ${{ steps.model-cache.outputs.cache-hit == 'true' }}" | |
| echo "Models directory contents:" | |
| ls -la $AUDIO_SEPARATOR_MODEL_DIR || echo "Directory empty or doesn't exist" | |
| - name: Run integration tests | |
| run: poetry run pytest tests -v --cov=audio_separator --cov-report=xml | |
| - name: Upload coverage reports to Codecov | |
| uses: codecov/codecov-action@v3 | |
| env: | |
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
| - name: Upload test results | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: integration-test-results | |
| path: | | |
| *.flac | |
| tests/*.flac |