Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Schedule python-tests.yml #211

Merged
merged 4 commits into from
Apr 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 15 additions & 7 deletions .github/workflows/python-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name: Tests
on:
push:
branches: [ master, main ]
schedule:
- cron: 0 0 * * *
pull_request:

env:
Expand All @@ -29,18 +31,24 @@ jobs:
name: Python ${{ matrix.python-version }} on ${{ matrix.os }} test

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v2
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 docs
- name: Run tests
run: |
export IS_UBUNTU_CI=$(test "${{ matrix.os }}" = "ubuntu-latest" && echo "true" || echo "false")
pytest
shell: bash

- name: Install Test Dependencies
run: pip install pytest pytest-md pytest-emoji

- name: Run pytest
uses: pavelzw/pytest-action@v2
with:
verbose: true
emoji: true
job-summary: true
report-title: 'FastEmbed Test Report'
4 changes: 2 additions & 2 deletions tests/test_text_onnx_embeddings.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@


def test_embedding():
is_ubuntu_ci = os.getenv("IS_UBUNTU_CI")
is_ci = os.getenv("CI")

for model_desc in TextEmbedding.list_supported_models():
if is_ubuntu_ci == "false" and model_desc["size_in_GB"] > 1:
if not is_ci and model_desc["size_in_GB"] > 1:
continue

dim = model_desc["dim"]
Expand Down
Loading