From 30c5996af2384be615ca518c7e54dc9a2ac8ad72 Mon Sep 17 00:00:00 2001 From: Mashiro <57566630+HAOCHENYE@users.noreply.github.com> Date: Wed, 29 Mar 2023 14:25:35 +0800 Subject: [PATCH] Skip test_dist in Github Action (#1027) --- .github/workflows/merge_stage_test.yml | 14 +++++--------- .github/workflows/pr_stage_test.yml | 8 ++++---- 2 files changed, 9 insertions(+), 13 deletions(-) diff --git a/.github/workflows/merge_stage_test.yml b/.github/workflows/merge_stage_test.yml index 8a4a28d6..d9b330ca 100644 --- a/.github/workflows/merge_stage_test.yml +++ b/.github/workflows/merge_stage_test.yml @@ -48,7 +48,7 @@ jobs: mim install 'mmcv>=2.0.0rc1' - name: Run unittests and generate coverage report run: | - coverage run --branch --source mmengine -m pytest tests/ + coverage run --branch --source mmengine -m pytest tests/ --ignore tests/test_dist coverage xml coverage report -m @@ -97,15 +97,11 @@ jobs: mim install 'mmcv>=2.0.0rc1' - name: Run unittests and generate coverage report run: | - if [[ ${{ matrix.torch }} == "1.13.0" ]]; then - coverage run --branch --source mmengine -m pytest tests/ --ignore tests/test_dist - else - coverage run --branch --source mmengine -m pytest tests/ - fi + coverage run --branch --source mmengine -m pytest tests/ --ignore tests/test_dist # Only upload coverage report for python3.7 && pytorch1.8.1 cpu - name: Upload coverage to Codecov if: ${{matrix.torch == '1.8.1' && matrix.python-version == '3.7'}} - uses: codecov/codecov-action@v1.0.14 + uses: codecov/codecov-action@v3 with: file: ./coverage.xml flags: unittests @@ -148,7 +144,7 @@ jobs: mim install 'mmcv>=2.0.0rc1' - name: Run unittests and generate coverage report run: | - coverage run --branch --source mmengine -m pytest tests/ + coverage run --branch --source mmengine -m pytest tests/ --ignore tests/test_dist coverage xml coverage report -m @@ -292,7 +288,7 @@ jobs: pip install openmim mim install 'mmcv>=2.0.0rc1' - name: Run CPU unittests - run: pytest tests/ + run: pytest tests/ --ignore tests/test_dist if: ${{ matrix.platform == 'cpu' }} - name: Run GPU unittests # Skip testing distributed related unit tests since the memory of windows CI is limited diff --git a/.github/workflows/pr_stage_test.yml b/.github/workflows/pr_stage_test.yml index a0c0aa2e..d11feda5 100644 --- a/.github/workflows/pr_stage_test.yml +++ b/.github/workflows/pr_stage_test.yml @@ -45,12 +45,12 @@ jobs: mim install 'mmcv>=2.0.0rc1' - name: Run unittests and generate coverage report run: | - coverage run --branch --source mmengine -m pytest tests/ + coverage run --branch --source mmengine -m pytest tests/ --ignore tests/test_dist coverage xml coverage report -m # Upload coverage report for python3.7 && pytorch1.8.1 cpu - name: Upload coverage to Codecov - uses: codecov/codecov-action@v1.0.14 + uses: codecov/codecov-action@v3 with: file: ./coverage.xml flags: unittests @@ -90,7 +90,7 @@ jobs: mim install 'mmcv>=2.0.0rc1' - name: Run unittests and generate coverage report run: | - coverage run --branch --source mmengine -m pytest tests/ + coverage run --branch --source mmengine -m pytest tests/ --ignore tests/test_dist coverage xml coverage report -m @@ -161,7 +161,7 @@ jobs: pip install openmim mim install 'mmcv>=2.0.0rc1' - name: Run CPU unittests - run: pytest tests/ + run: pytest tests/ --ignore tests/test_dist if: ${{ matrix.platform == 'cpu' }} - name: Run GPU unittests # Skip testing distributed related unit tests since the memory of windows CI is limited -- GitLab