From a4768226eeb2ac56996432ae176967dcd9a7f52e Mon Sep 17 00:00:00 2001 From: Erik Sundell Date: Mon, 18 Oct 2021 02:05:44 +0200 Subject: [PATCH] ci: make pytest report time per test --- .github/integration-test.py | 2 +- .github/workflows/integration-test.yaml | 2 +- .github/workflows/unit-test.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/integration-test.py b/.github/integration-test.py index 7235e06..ab6f83e 100755 --- a/.github/integration-test.py +++ b/.github/integration-test.py @@ -116,7 +116,7 @@ def run_test(image_name, test_name, bootstrap_pip_spec, test_files, upgrade, ins ) run_container_command( test_name, - '/opt/tljh/hub/bin/python3 -m pytest --verbose --maxfail=2 --color=yes --capture=no {}'.format( + '/opt/tljh/hub/bin/python3 -m pytest --verbose --maxfail=2 --color=yes --durations=10 --capture=no {}'.format( ' '.join([os.path.join('/srv/src/integration-tests/', f) for f in test_files]) ) ) diff --git a/.github/workflows/integration-test.yaml b/.github/workflows/integration-test.yaml index a126d3a..8afa2af 100644 --- a/.github/workflows/integration-test.yaml +++ b/.github/workflows/integration-test.yaml @@ -112,7 +112,7 @@ jobs: - name: Run bootstrap tests run: | - pytest --verbose --maxfail=2 --color=yes --capture=no \ + pytest --verbose --maxfail=2 --color=yes --durations=10 --capture=no \ integration-tests/test_bootstrap.py - name: Run basic tests diff --git a/.github/workflows/unit-test.yaml b/.github/workflows/unit-test.yaml index 04cff1b..89e166c 100644 --- a/.github/workflows/unit-test.yaml +++ b/.github/workflows/unit-test.yaml @@ -90,7 +90,7 @@ jobs: pip freeze - name: Run unit tests - run: pytest --verbose --maxfail=2 --color=yes --cov=tljh tests/ + run: pytest --verbose --maxfail=2 --color=yes --durations=10 --cov=tljh tests/ - name: Upload code coverage stats run: codecov