Skip to content

A programming framework for agentic AI

Print slow tests in CI (#2082)

Jack Gerrits2ad016d18dbf
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 3b780d5a0..26bb01046 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 6f4067f34..d2780eea5 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