Skip to content

bugfix: remove infinite loop from index_and_search.py #42

bugfix: remove infinite loop from index_and_search.py

bugfix: remove infinite loop from index_and_search.py #42

Workflow file for this run

name: Test and Lint
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
quality:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
services:
typesense:
image: typesense/typesense:28.0
ports:
- 8108:8108
volumes:
- /tmp/typesense-data:/data
- /tmp/typesense-analytics:/analytics
env:
TYPESENSE_API_KEY: xyz
TYPESENSE_DATA_DIR: /data
TYPESENSE_ENABLE_CORS: true
TYPESENSE_ANALYTICS_DIR: /analytics
TYPESENSE_ENABLE_SEARCH_ANALYTICS: true
steps:
- name: Wait for Typesense
run: |
timeout 20 bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' localhost:8108/health)" != "200" ]]; do sleep 1; done' || false
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements/dev.txt
- name: Lint with Flake8
run: |
flake8 src/typesense
- name: Check types with mypy
run: |
mypy src/typesense
- name: Run tests and coverage (excluding OpenAI)
run: |
coverage run -m pytest -m "not open_ai"