Files
WhisperLive/.github/workflows/ci.yml
T
2024-02-08 11:26:17 +05:30

56 lines
1.3 KiB
YAML

name: CI
on:
push:
branches:
- main
tags:
- v*
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8, 3.9, '3.10', 3.11]
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Set up FFmpeg
uses: FedericoCarboni/setup-ffmpeg@v2
- name: Install Additional requirements
run: |
sudo apt-get -y install portaudio19-dev wget
- name: Install Client and Server Requirements
run: |
pip install -r requirements/client.txt
pip install -r requirements/server.txt
- name: Run Tests
run: |
# Add commands to run your tests here
echo "Running tests against Python ${{ matrix.python-version }}"
- name: Build wheel
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
run: |
pip install wheel twine
python setup.py sdist bdist_wheel
- name: Push package on PyPI
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}