From 748b9ef7a385efcad21c1edbf08b360d6b218279 Mon Sep 17 00:00:00 2001 From: Fedir Zadniprovskyi Date: Sat, 21 Sep 2024 11:43:03 -0700 Subject: [PATCH] ci: do not run tests which require OpenAI API key --- .github/workflows/test.yaml | 2 +- tests/openai_timestamp_granularities_test.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 4d9d077..78b81fc 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -20,4 +20,4 @@ jobs: - run: uv python install 3.12 - run: uv sync --extra dev # TODO: figure out why `pytest` doesn't discover tests in `faster_whisper_server` directory by itself - - run: uv run pytest src/faster_whisper_server/* tests + - run: uv run pytest -m "not requires_openai" src/faster_whisper_server/* tests diff --git a/tests/openai_timestamp_granularities_test.py b/tests/openai_timestamp_granularities_test.py index 6564336..e88129a 100644 --- a/tests/openai_timestamp_granularities_test.py +++ b/tests/openai_timestamp_granularities_test.py @@ -6,6 +6,7 @@ @pytest.mark.asyncio() +@pytest.mark.requires_openai() @pytest.mark.parametrize("timestamp_granularities", TIMESTAMP_GRANULARITIES_COMBINATIONS) async def test_openai_json_response_format_and_timestamp_granularities_combinations( actual_openai_client: AsyncOpenAI, @@ -28,6 +29,7 @@ async def test_openai_json_response_format_and_timestamp_granularities_combinati @pytest.mark.asyncio() +@pytest.mark.requires_openai() @pytest.mark.parametrize("timestamp_granularities", TIMESTAMP_GRANULARITIES_COMBINATIONS) async def test_openai_verbose_json_response_format_and_timestamp_granularities_combinations( actual_openai_client: AsyncOpenAI,