Add the transcribe endpoint to the client #19
Workflow file for this run
This file contains 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: ci-cd | |
on: | |
workflow_dispatch: | |
pull_request: | |
branches: | |
- main | |
push: | |
branches: | |
- main | |
paths: | |
- .github/workflows/ci-cd.yaml | |
- src/** | |
- tests/** | |
release: | |
types: | |
- published | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
check-quality: | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout | |
uses: actions/checkout@v3 | |
- name: setup-python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.8 | |
- name: install-dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install ".[quality]" | |
- name: check-quality | |
run: | | |
black --check --diff --preview src tests | |
ruff src tests | |
run-tests: | |
needs: check-quality | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout | |
uses: actions/checkout@v3 | |
- name: setup-python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.8 | |
- name: Install PortAudio | |
run: sudo apt-get install portaudio19-dev | |
- name: install-dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install ".[tests]" | |
- name: run-tests | |
run: pytest --cov=tensorshare --cov-report=term-missing tests/ -s --durations 0 | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v3 | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
deploy-docs: | |
needs: run-tests | |
if: (github.event_name == 'release') || (github.event_name == 'push' && github.ref == 'refs/heads/main') | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: checkout | |
uses: actions/checkout@v3 | |
- name: setup-python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.8 | |
- name: install-dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -e ".[docs]" | |
- name: deploy-to-gh-pages | |
run: mkdocs gh-deploy --force | |
publish-package: | |
needs: deploy-docs | |
if: github.event_name == 'release' | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout | |
uses: actions/checkout@v3 | |
- name: setup-python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.8 | |
- name: install-dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install hatch | |
- name: build-package | |
run: hatch build | |
- name: publish-package | |
run: hatch publish --user __token__ --auth $PYPI_TOKEN | |
env: | |
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} |