Skip to content

allow mmh3 4.X

allow mmh3 4.X #260

Workflow file for this run

name: Pull-request CI
on:
- pull_request
- merge_group
jobs:
run-tests:
name: Run tests
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
python-version: [3.8, 3.9, '3.10', 3.11, 3.12]
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: 1.3.2
- name: Install dependencies
run: |
if [ "${{ matrix.python-version }}" == "3.12" ]; then
poetry install --with dev -E openai -E cohere
else
poetry install --with dev --all-extras
fi
- name: Install pytorch CPU for ubuntu-latest
run: poetry run pip uninstall -y torch torchvision; poetry run pip install torch torchvision --index-url https://download.pytorch.org/whl/cpu
if: matrix.os == 'ubuntu-latest' && matrix.python-version != '3.12'
- run: poetry run black --check .
- run: poetry run mypy .
- name: Run unit tests
run: poetry run pytest tests/unit
- name: Run system tests
if: github.event_name == 'merge_group' && matrix.python-version == '3.10'
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
CO_API_KEY: ${{ secrets.CO_API_KEY }}
AZURE_OPENAI_API_KEY: ${{ secrets.AZURE_OPENAI_API_KEY }}
AZURE_OPENAI_ENDPOINT: ${{ secrets.AZURE_OPENAI_ENDPOINT }}
OPENAI_API_VERSION: ${{ secrets.OPENAI_API_VERSION }}
EMBEDDINGS_AZURE_OPENAI_DEPLOYMENT_NAME: ${{ secrets.EMBEDDINGS_AZURE_OPENAI_DEPLOYMENT_NAME }}
run: poetry run pytest tests/system