From 4793125453d9ca5328abdb6f6d76b07483e29f9b Mon Sep 17 00:00:00 2001 From: Jinzhe Zeng Date: Tue, 12 Nov 2024 03:07:24 -0500 Subject: [PATCH] CI: set `--clean-durations` for pytest-split (#4341) I noticed that the CI is broken in several PRs. The duration files are not generated correctly and become larger and larger, causing out-of-memory. ## Summary by CodeRabbit - **Chores** - Updated the workflow configuration for Python testing to enhance test duration management and artifact handling. - Improved caching mechanisms for test durations to ensure uniqueness and avoid conflicts. --- .github/workflows/test_python.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test_python.yml b/.github/workflows/test_python.yml index ba8858d6b9..1b1935a2f6 100644 --- a/.github/workflows/test_python.yml +++ b/.github/workflows/test_python.yml @@ -54,7 +54,7 @@ jobs: restore-keys: | test2-durations-combined-${{ matrix.python }}-${{ github.sha }} test2-durations-combined-${{ matrix.python }} - - run: pytest --cov=deepmd source/tests --durations=0 --splits 6 --group ${{ matrix.group }} --store-durations --durations-path=.test_durations --splitting-algorithm least_duration + - run: pytest --cov=deepmd source/tests --durations=0 --splits 6 --group ${{ matrix.group }} --store-durations --clean-durations --durations-path=.test_durations --splitting-algorithm least_duration env: NUM_WORKERS: 0 - name: Test TF2 eager mode