From 466886a317d1cd6535c628600a628d5edbeeaa02 Mon Sep 17 00:00:00 2001 From: Anush Date: Fri, 26 Apr 2024 10:28:37 +0530 Subject: [PATCH] ci: Schedule python-tests.yml (#211) * ci: Schedule python-tests.yml * ci: use emojis * ci: Bump action versions python-tests.yml * ci: python-tests.yml --- .github/workflows/python-tests.yml | 22 +++++++++++++++------- tests/test_text_onnx_embeddings.py | 4 ++-- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/.github/workflows/python-tests.yml b/.github/workflows/python-tests.yml index 3107fb9..9d517b1 100644 --- a/.github/workflows/python-tests.yml +++ b/.github/workflows/python-tests.yml @@ -3,6 +3,8 @@ name: Tests on: push: branches: [ master, main ] + schedule: + - cron: 0 0 * * * pull_request: env: @@ -29,9 +31,9 @@ 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 @@ -39,8 +41,14 @@ jobs: 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' diff --git a/tests/test_text_onnx_embeddings.py b/tests/test_text_onnx_embeddings.py index c70f9ec..da7387f 100644 --- a/tests/test_text_onnx_embeddings.py +++ b/tests/test_text_onnx_embeddings.py @@ -39,10 +39,10 @@ CANONICAL_VECTOR_VALUES = { 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"]