feat: add generate function to ai voice generator (#102) #233
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
| # This workflow will test the python package against Sideko's Mock Servers | |
| # Tests will run automatically on a push to `main` or a pull request event | |
| name: pytest | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: {} | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: | |
| - "3.8" | |
| - "3.9" | |
| - "3.10" | |
| - "3.11" | |
| - "3.12" | |
| - "3.13" | |
| steps: | |
| #---------------------------------------------- | |
| # ----- checkout & setup python ----- | |
| #---------------------------------------------- | |
| - name: checkout repository | |
| uses: actions/checkout@v4 | |
| - name: setup python | |
| uses: actions/setup-python@v5 | |
| id: setup-python | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| #---------------------------------------------- | |
| # ----- install & configure poetry ----- | |
| #---------------------------------------------- | |
| - name: install poetry | |
| uses: snok/install-poetry@v1 | |
| with: | |
| version: "1.8.5" | |
| virtualenvs-create: true | |
| virtualenvs-in-project: true | |
| virtualenvs-path: .venv | |
| installer-parallel: true | |
| #--------------------------------------------------- | |
| # ----- load cached venv if cache exists ----- | |
| #--------------------------------------------------- | |
| - name: load cached venv | |
| id: cached-poetry-dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: .venv | |
| key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }} | |
| #--------------------------------------------------------------- | |
| # ----- install dependencies if cache does not exist ----- | |
| #--------------------------------------------------------------- | |
| - name: install dependencies | |
| if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' | |
| run: poetry install --no-interaction --no-root | |
| #----------------------------------------------------------- | |
| # ----- install your root project, if required ----- | |
| #----------------------------------------------------------- | |
| - name: install project | |
| run: poetry install --no-interaction | |
| #------------------------------ | |
| # ----- run pytest ----- | |
| #------------------------------ | |
| - name: run pytest | |
| run: | | |
| source .venv/bin/activate | |
| pytest -s | |
| #------------------------------ | |
| # ----- run mypy ----- | |
| #------------------------------ | |
| - name: run mypy | |
| run: | | |
| source .venv/bin/activate | |
| mypy $(poetry version | cut -d' ' -f1) |