Skip to content

Commit

Permalink
ci: Schedule python-tests.yml (#211)
Browse files Browse the repository at this point in the history
* ci: Schedule python-tests.yml

* ci: use emojis

* ci: Bump action versions python-tests.yml

* ci: python-tests.yml
  • Loading branch information
Anush008 authored Apr 26, 2024
1 parent cc4112d commit 466886a
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 9 deletions.
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

0 comments on commit 466886a

Please sign in to comment.