Add Code Coverage Reports (#4336)
This commit is contained in:
parent
9366062af2
commit
f6b58e9d75
5 changed files with 40 additions and 5 deletions
11
.github/workflows/ci.yaml
vendored
11
.github/workflows/ci.yaml
vendored
|
|
@ -165,9 +165,9 @@ jobs:
|
|||
run: | # CoreML must be installed before export due to protobuf error from AutoInstall
|
||||
python -m pip install --upgrade pip wheel
|
||||
if [ "${{ matrix.torch }}" == "1.8.0" ]; then
|
||||
pip install -e . torch==1.8.0 torchvision==0.9.0 pytest "coremltools>=7.0.b1" --extra-index-url https://download.pytorch.org/whl/cpu
|
||||
pip install -e . torch==1.8.0 torchvision==0.9.0 pytest-cov "coremltools>=7.0.b1" --extra-index-url https://download.pytorch.org/whl/cpu
|
||||
else
|
||||
pip install -e . pytest "coremltools>=7.0.b1" --extra-index-url https://download.pytorch.org/whl/cpu
|
||||
pip install -e . pytest-cov "coremltools>=7.0.b1" --extra-index-url https://download.pytorch.org/whl/cpu
|
||||
fi
|
||||
- name: Check environment
|
||||
run: |
|
||||
|
|
@ -182,7 +182,12 @@ jobs:
|
|||
pip list
|
||||
- name: Pytest tests
|
||||
shell: bash # for Windows compatibility
|
||||
run: pytest tests
|
||||
run: pytest --cov=ultralytics/ --cov-report xml tests/
|
||||
- name: Upload coverage reports to Codecov
|
||||
if: github.repository == 'ultralytics/ultralytics' && matrix.os == 'ubuntu-latest' && matrix.python-version == '3.11'
|
||||
uses: codecov/codecov-action@v3
|
||||
env:
|
||||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
||||
|
||||
Summary:
|
||||
runs-on: ubuntu-latest
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue