From 2ad016d18dbf1b1e792166c87282fec977114744 Mon Sep 17 00:00:00 2001 From: Jack Gerrits Date: Wed, 20 Mar 2024 18:27:35 -0400 Subject: [PATCH] Print slow tests in CI (#2082) Co-authored-by: Chi Wang --- .github/workflows/build.yml | 6 +++--- .github/workflows/openai.yml | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3b780d5a0d..26bb01046e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -57,16 +57,16 @@ jobs: - name: Test with pytest skipping openai tests if: matrix.python-version != '3.10' && matrix.os == 'ubuntu-latest' run: | - pytest test --skip-openai + pytest test --skip-openai --durations=10 --durations-min=1.0 - name: Test with pytest skipping openai and docker tests if: matrix.python-version != '3.10' && matrix.os != 'ubuntu-latest' run: | - pytest test --skip-openai --skip-docker + pytest test --skip-openai --skip-docker --durations=10 --durations-min=1.0 - name: Coverage if: matrix.python-version == '3.10' run: | pip install -e .[test,redis] - coverage run -a -m pytest test --ignore=test/agentchat/contrib --skip-openai + coverage run -a -m pytest test --ignore=test/agentchat/contrib --skip-openai --durations=10 --durations-min=1.0 coverage xml - name: Upload coverage to Codecov if: matrix.python-version == '3.10' diff --git a/.github/workflows/openai.yml b/.github/workflows/openai.yml index 6f4067f341..d2780eea54 100644 --- a/.github/workflows/openai.yml +++ b/.github/workflows/openai.yml @@ -63,7 +63,7 @@ jobs: AZURE_OPENAI_API_BASE: ${{ secrets.AZURE_OPENAI_API_BASE }} OAI_CONFIG_LIST: ${{ secrets.OAI_CONFIG_LIST }} run: | - coverage run -a -m pytest test --ignore=test/agentchat/contrib + coverage run -a -m pytest test --ignore=test/agentchat/contrib --durations=10 --durations-min=1.0 coverage xml - name: Coverage and check notebook outputs if: matrix.python-version != '3.9' @@ -75,7 +75,7 @@ jobs: OAI_CONFIG_LIST: ${{ secrets.OAI_CONFIG_LIST }} run: | pip install nbconvert nbformat ipykernel - coverage run -a -m pytest test/test_notebook.py + coverage run -a -m pytest test/test_notebook.py --durations=10 --durations-min=1.0 coverage xml cat "$(pwd)/test/executed_openai_notebook_output.txt" - name: Upload coverage to Codecov