Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: patch run with no tests #2362

Merged
merged 2 commits into from
Feb 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .azure/gpu-unittests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,8 @@ jobs:
--cov=torchmetrics --timeout=240 --durations=100 \
--reruns 3 --reruns-delay 1
workingDirectory: tests
# skip for PR if there is nothing to test, note that outside PR there is default 'unittests'
condition: ne(variables['TEST_DIRS'], '')
displayName: "UnitTesting common"

- bash: |
Expand All @@ -155,6 +157,8 @@ jobs:
env:
USE_PYTEST_POOL: "1"
workingDirectory: tests
# skip for PR if there is nothing to test, note that outside PR there is default 'unittests'
condition: ne(variables['TEST_DIRS'], '')
displayName: "UnitTesting DDP"

- bash: |
Expand All @@ -164,6 +168,8 @@ jobs:
--commit=$(Build.SourceVersion) --flags=gpu,unittest --env=linux,azure
ls -l
workingDirectory: tests
# skip for PR if there is nothing to test, note that outside PR there is default 'unittests'
condition: ne(variables['TEST_DIRS'], '')
displayName: "Statistics"

- bash: |
Expand All @@ -175,6 +181,8 @@ jobs:
python $fn
done
workingDirectory: examples
# skip for PR if there is nothing to test, note that outside PR there is default 'unittests'
condition: ne(variables['TEST_DIRS'], '')
displayName: "Examples"

- bash: |
Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/ci-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,8 @@ jobs:
run: python -m phmdoctest README.md --outfile tests/unittests/test_readme.py

- name: Unittests common
# skip for PR if there is nothing to test, note that outside PR there is default 'unittests'
if: ${{ env.TEST_DIRS != '' }}
working-directory: ./tests
run: |
python -m pytest -v \
Expand All @@ -158,6 +160,8 @@ jobs:
${{ env.UNITTEST_TIMEOUT }}

- name: Unittests DDP
# skip for PR if there is nothing to test, note that outside PR there is default 'unittests'
if: ${{ env.TEST_DIRS != '' }}
working-directory: ./tests
env:
USE_PYTEST_POOL: "1"
Expand All @@ -172,13 +176,16 @@ jobs:
${{ env.UNITTEST_TIMEOUT }}

- name: Statistics
if: success()
# skip for PR if there is nothing to test, note that outside PR there is default 'unittests'
if: ${{ env.TEST_DIRS != '' }}
working-directory: ./tests
run: |
coverage xml
coverage report

- name: Upload coverage to Codecov
# skip for PR if there is nothing to test, note that outside PR there is default 'unittests'
if: ${{ env.TEST_DIRS != '' }}
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
Expand Down
Loading