Skip to content

Trigger CI test

Trigger CI test #1745

Workflow file for this run

name: Tests
on:
push:
branches: [ speedup-ci ] # master, main, gpu
# pull_request:
env:
CARGO_TERM_COLOR: always
jobs:
test:
strategy:
matrix:
python-version:
# - '3.9.x'
# - '3.10.x'
# - '3.11.x'
# - '3.12.x'
- '3.13.x'
os:
- ubuntu-latest
# - macos-latest
# - windows-latest
runs-on: ${{ matrix.os }}
name: Python ${{ matrix.python-version }} on ${{ matrix.os }} test
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install poetry
poetry config virtualenvs.create false
poetry install --no-interaction --no-ansi --without dev,docs
- name: Compute Model Cache Key
id: model_cache_key
run: echo "MODEL_HASH=$(python tests/get_all_model_hash.py)" >> $GITHUB_ENV
- name: Set Model Cache Directory
run: |
if [[ "$RUNNER_OS" == "Windows" ]]; then
echo "MODEL_CACHE_DIR=$TEMP/fastembed_cache" >> $GITHUB_ENV
elif [[ "$RUNNER_OS" == "MacOS" ]]; then
echo "MODEL_CACHE_DIR=/private/var/tmp/fastembed_cache" >> $GITHUB_ENV
else
echo "MODEL_CACHE_DIR=/tmp/fastembed_cache" >> $GITHUB_ENV
fi
shell: bash
- name: Cache Model Files
uses: actions/cache@v4
with:
path: "${{ env.MODEL_CACHE_DIR }}"
key: ml-models-cache-${{ env.MODEL_HASH }}"
restore-keys: |
ml-models-cache-
enableCrossOsArchive: true
- name: Run pytest
run: |
poetry run pytest tests/test_sparse_embeddings.py
- name: List Cached Models (Linux)
if: runner.os == 'Linux'
run: ls -lah /tmp/fastembed_cache
shell: bash
- name: List Cached Models (Windows)
if: runner.os == 'Windows'
run: ls -la "$TEMP/fastembed_cache"
shell: bash
- name: List Cached Models (MacOS) tmp
if: runner.os == 'MacOS'
run: ls -lah /private/var/tmp/
shell: bash
- name: List Cached Models (MacOS) tmp
if: runner.os == 'MacOS'
run: ls -lah /tmp/
shell: bash