add `uv cache prune` and skip cache for `uv run pytest`

uv-pytests
Burhan 2 weeks ago committed by GitHub
parent d53eb5ee53
commit 30676df4d0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 8
      .github/workflows/ci.yaml

@ -197,7 +197,7 @@ jobs:
if [[ "${{ github.event_name }}" =~ ^(schedule|workflow_dispatch)$ ]]; then if [[ "${{ github.event_name }}" =~ ^(schedule|workflow_dispatch)$ ]]; then
slow="--slow" slow="--slow"
fi fi
uv run --resolution lowest-direct pytest $slow --cov=ultralytics/ --cov-report xml tests/ uv run --resolution lowest-direct -n pytest $slow --cov=ultralytics/ --cov-report xml tests/
- name: Upload Coverage Reports to CodeCov - name: Upload Coverage Reports to CodeCov
if: github.repository == 'ultralytics/ultralytics' # && matrix.os == 'ubuntu-latest' && matrix.python-version == '3.11' if: github.repository == 'ultralytics/ultralytics' # && matrix.os == 'ubuntu-latest' && matrix.python-version == '3.11'
uses: codecov/codecov-action@v5 uses: codecov/codecov-action@v5
@ -205,6 +205,8 @@ jobs:
flags: Tests flags: Tests
env: env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- name: Prune uv Cache
run: uv cache prune --ci
GPU: GPU:
if: github.repository == 'ultralytics/ultralytics' && (github.event_name != 'workflow_dispatch' || github.event.inputs.gpu == 'true') if: github.repository == 'ultralytics/ultralytics' && (github.event_name != 'workflow_dispatch' || github.event.inputs.gpu == 'true')
@ -225,13 +227,15 @@ jobs:
if [[ "${{ github.event_name }}" =~ ^(schedule|workflow_dispatch)$ ]]; then if [[ "${{ github.event_name }}" =~ ^(schedule|workflow_dispatch)$ ]]; then
slow="--slow" slow="--slow"
fi fi
uv run --resolution lowest-direct pytest $slow --cov=ultralytics/ --cov-report xml tests/test_cuda.py uv run --resolution lowest-direct -n pytest $slow --cov=ultralytics/ --cov-report xml tests/test_cuda.py
- name: Upload Coverage Reports to CodeCov - name: Upload Coverage Reports to CodeCov
uses: codecov/codecov-action@v5 uses: codecov/codecov-action@v5
with: with:
flags: GPU flags: GPU
env: env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- name: Prune uv Cache
run: uv cache prune --ci
RaspberryPi: RaspberryPi:
if: github.repository == 'ultralytics/ultralytics' && (github.event_name == 'schedule' || github.event.inputs.raspberrypi == 'true') if: github.repository == 'ultralytics/ultralytics' && (github.event_name == 'schedule' || github.event.inputs.raspberrypi == 'true')

Loading…
Cancel
Save