🌿 Fern Regeneration -- October 31, 2024 (#210) #234
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 | |
on: [push] | |
jobs: | |
compile-without-audio: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v3 | |
- name: Set up python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.9 | |
- name: Bootstrap poetry | |
run: | | |
curl -sSL https://install.python-poetry.org | python - -y --version 1.5.1 | |
- name: Install dependencies | |
run: poetry install | |
- name: Type check everything except audio utilities and legacy | |
run: poetry run mypy . --exclude 'src/hume/empathic_voice/chat/audio' --exclude 'src/hume/legacy/microphone' | |
compile-with-audio: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v3 | |
- name: Set up python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.9 | |
- name: Install system dependencies for audio | |
run: | | |
sudo apt-get --yes update | |
sudo apt-get --yes install libasound2-dev libportaudio2 ffmpeg | |
- name: Bootstrap poetry | |
run: | | |
curl -sSL https://install.python-poetry.org | python - -y --version 1.5.1 | |
- name: Install dependencies | |
run: poetry install -E microphone | |
- name: Compile | |
run: poetry run mypy . | |
test: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v3 | |
- name: Set up python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.9 | |
- name: Install system dependencies for audio | |
run: | | |
sudo apt-get --yes update | |
sudo apt-get --yes install libasound2-dev libportaudio2 ffmpeg | |
- name: Bootstrap poetry | |
run: | | |
curl -sSL https://install.python-poetry.org | python - -y --version 1.5.1 | |
- name: Install dependencies | |
run: poetry install -E microphone | |
- name: Install Fern | |
run: npm install -g fern-api | |
- name: Test | |
run: fern test --command "poetry run pytest -rP . --ignore ./tests/custom/_legacy" | |
publish: | |
needs: [compile-without-audio, compile-with-audio, test] | |
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v3 | |
- name: Set up python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.9 | |
- name: Bootstrap poetry | |
run: | | |
curl -sSL https://install.python-poetry.org | python - -y --version 1.5.1 | |
- name: Install dependencies | |
run: poetry install | |
- name: Publish to pypi | |
run: | | |
poetry config repositories.remote https://upload.pypi.org/legacy/ | |
poetry --no-interaction -v publish --build --repository remote --username "$PYPI_USERNAME" --password "$PYPI_PASSWORD" | |
env: | |
PYPI_USERNAME: ${{ secrets.PYPI_USERNAME }} | |
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }} |