cover subproc coverage (#6477)
This commit is contained in:
parent
079fe9bc09
commit
afe0ededa3
|
@ -44,12 +44,30 @@ jobs:
|
|||
- name: Tests
|
||||
run: |
|
||||
# NOTE: run coverage on tests does not propagare faler status for Win, https://github.com/nedbat/coveragepy/issues/1003
|
||||
python -m pytest pytorch_lightning tests -v --durations=50 --junitxml=junit/test-results-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.requires }}.xml
|
||||
python -m pytest pytorch_lightning tests --cov=pytorch_lightning -v --durations=50 --junitxml=junit/test-results-${{ runner.os }}-torch${{ matrix.pytorch-version }}.xml
|
||||
shell: bash -l {0}
|
||||
|
||||
- name: Upload pytest test results
|
||||
- name: Upload pytest results
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: pytest-results-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.requires }}
|
||||
path: junit/test-results-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.requires }}.xml
|
||||
if: failure()
|
||||
|
||||
- name: Statistics
|
||||
if: success()
|
||||
run: |
|
||||
coverage report
|
||||
coverage xml
|
||||
|
||||
- name: Upload coverage to Codecov
|
||||
uses: codecov/codecov-action@v1
|
||||
if: always()
|
||||
# see: https://github.com/actions/toolkit/issues/399
|
||||
continue-on-error: true
|
||||
with:
|
||||
token: ${{ secrets.CODECOV_TOKEN }}
|
||||
file: coverage.xml
|
||||
flags: cpu,pytest,torch${{ matrix.pytorch-version }}
|
||||
name: CPU-coverage
|
||||
fail_ci_if_error: false
|
||||
|
|
|
@ -138,13 +138,13 @@ jobs:
|
|||
- name: Tests
|
||||
run: |
|
||||
# NOTE: do not include coverage report here, see: https://github.com/nedbat/coveragepy/issues/1003
|
||||
coverage run --source pytorch_lightning -m pytest pytorch_lightning tests -v --durations=50 --junitxml=junit/test-results-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.requires }}.xml
|
||||
python -m pytest pytorch_lightning tests --cov=pytorch_lightning -v --durations=50 --junitxml=junit/test-results-${{ runner.os }}-py${{ matrix.python-version }}-${{ matrix.requires }}.xml
|
||||
|
||||
- name: Examples
|
||||
run: |
|
||||
python -m pytest pl_examples -v --durations=10
|
||||
|
||||
- name: Upload pytest test results
|
||||
- name: Upload pytest results
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: pytest-results-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.requires }}
|
||||
|
@ -165,6 +165,6 @@ jobs:
|
|||
with:
|
||||
token: ${{ secrets.CODECOV_TOKEN }}
|
||||
file: coverage.xml
|
||||
flags: cpu,pytest
|
||||
flags: cpu,pytest,python${{ matrix.python-version }}
|
||||
name: CPU-coverage
|
||||
fail_ci_if_error: false
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
coverage>=5.0
|
||||
coverage>=5.2
|
||||
codecov>=2.1
|
||||
pytest>=5.0
|
||||
# pytest-cov
|
||||
pytest>=6.0
|
||||
pytest-cov>2.10
|
||||
pytest-xdist
|
||||
flake8>=3.6
|
||||
check-manifest
|
||||
twine==3.2
|
||||
|
|
Loading…
Reference in New Issue