From ca4fb7d1540acd47d7bef6f83f379e5724c7bb9a Mon Sep 17 00:00:00 2001 From: kozistr Date: Sat, 1 Jan 2022 15:31:38 +0900 Subject: [PATCH 1/2] feature: boost speed of pytest --- .github/workflows/tests.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 9e0a4aac..908b1ec8 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -30,7 +30,7 @@ jobs: - name: Install testing dependencies run: | python -m pip install --upgrade pip - pip install pytest pytest-timeout expecttest + pip install pytest pytest-timeout expecttest pytest-xdist - name: Install torch on mac if: startsWith(matrix.os, 'macOS') run: pip install --no-cache-dir torch==${{ matrix.torch }} torchvision==${{ matrix.torchvision }} @@ -48,4 +48,5 @@ jobs: env: LD_PRELOAD: /usr/lib/x86_64-linux-gnu/libtcmalloc.so.4 run: | - pytest -vv --durations=0 ./tests + export PYTHONDONTWRITEBYTECODE=1 + pytest -vv --durations=0 -n auto ./tests From df5afabc92eae6edc7575730f1063875ae52373f Mon Sep 17 00:00:00 2001 From: kozistr Date: Sun, 2 Jan 2022 14:39:17 +0900 Subject: [PATCH 2/2] update: rollback pytest-xdist --- .github/workflows/tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 908b1ec8..bcb42fee 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -30,7 +30,7 @@ jobs: - name: Install testing dependencies run: | python -m pip install --upgrade pip - pip install pytest pytest-timeout expecttest pytest-xdist + pip install pytest pytest-timeout expecttest - name: Install torch on mac if: startsWith(matrix.os, 'macOS') run: pip install --no-cache-dir torch==${{ matrix.torch }} torchvision==${{ matrix.torchvision }} @@ -49,4 +49,4 @@ jobs: LD_PRELOAD: /usr/lib/x86_64-linux-gnu/libtcmalloc.so.4 run: | export PYTHONDONTWRITEBYTECODE=1 - pytest -vv --durations=0 -n auto ./tests + pytest -vv --durations=0 ./tests