fix(document): fix types for document deletion #80
This file contains hidden or 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: Test and Lint | |
| on: | |
| push: | |
| branches: [ master ] | |
| pull_request: | |
| branches: [ master ] | |
| jobs: | |
| quality: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.9", "3.10", "3.11", "3.12"] | |
| steps: | |
| - name: Start Typesense | |
| run: | | |
| docker run -d \ | |
| -p 8108:8108 \ | |
| --name typesense \ | |
| -v /tmp/typesense-data:/data \ | |
| -v /tmp/typesense-analytics-data:/analytics-data \ | |
| typesense/typesense:30.0.alpha1 \ | |
| --api-key=xyz \ | |
| --data-dir=/data \ | |
| --enable-search-analytics=true \ | |
| --analytics-dir=/analytics-data \ | |
| --analytics-flush-interval=60 \ | |
| --analytics-minute-rate-limit=50 \ | |
| --enable-cors | |
| - 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: Install uv and set the python version | |
| uses: astral-sh/setup-uv@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install the project | |
| run: uv sync --locked --all-extras --dev | |
| - name: Lint with Ruff | |
| run: | | |
| uv run ruff check src/typesense | |
| - name: Check types with mypy | |
| run: | | |
| uv run mypy src/typesense | |
| - name: Run tests and coverage (excluding OpenAI) | |
| run: | | |
| uv run coverage run -m pytest -m "not open_ai" |