activated color in all pytest runs (#4254)
* activated color in all pytest runs * Update .drone.yml Co-authored-by: Jeff Yang <ydcjeff@outlook.com> Co-authored-by: Jeff Yang <ydcjeff@outlook.com>
This commit is contained in:
parent
3777988502
commit
829d90b257
|
@ -56,8 +56,8 @@ steps:
|
|||
- pip install -r ./requirements/examples.txt --user -q --upgrade-strategy only-if-needed
|
||||
- pip list
|
||||
- python -c "import torch ; print(' & '.join([torch.cuda.get_device_name(i) for i in range(torch.cuda.device_count())]) if torch.cuda.is_available() else 'only CPU')"
|
||||
- coverage run --source pytorch_lightning -m py.test pytorch_lightning tests -v --durations=25 # --flake8
|
||||
- python -m py.test benchmarks pl_examples -v --maxfail=2 --durations=0 # --flake8
|
||||
- coverage run --source pytorch_lightning -m pytest pytorch_lightning tests -v --color=yes --durations=25 # --flake8
|
||||
- python -m py.test benchmarks pl_examples -v --color=yes --maxfail=2 --durations=0 # --flake8
|
||||
#- cd docs; make doctest; make coverage
|
||||
- coverage report
|
||||
# see: https://docs.codecov.io/docs/merging-reports
|
||||
|
|
|
@ -196,7 +196,7 @@ This is useful if you do not test against all required dependency versions.
|
|||
**Docker:** Another option is utilize the [pytorch lightning cuda base docker image](https://hub.docker.com/repository/docker/pytorchlightning/pytorch_lightning/tags?page=1&name=cuda). You can then run:
|
||||
|
||||
```bash
|
||||
python -m pytest pytorch_lightning tests pl_examples -v --flake8
|
||||
python -m pytest pytorch_lightning tests pl_examples -v --color=yes --flake8
|
||||
```
|
||||
|
||||
### Pull Request
|
||||
|
|
|
@ -69,7 +69,7 @@ jobs:
|
|||
- name: Test Package [only]
|
||||
run: |
|
||||
# NOTE: run coverage on tests does not propagare faler status for Win, https://github.com/nedbat/coveragepy/issues/1003
|
||||
coverage run --source pytorch_lightning -m pytest pytorch_lightning -v --junitxml=junit/test-results-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.requires }}.xml
|
||||
coverage run --source pytorch_lightning -m pytest pytorch_lightning -v --color=yes --junitxml=junit/test-results-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.requires }}.xml
|
||||
|
||||
- name: Upload pytest test results
|
||||
uses: actions/upload-artifact@master
|
||||
|
|
|
@ -41,7 +41,7 @@ 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=0 --junitxml=junit/test-results-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.requires }}.xml
|
||||
python -m pytest pytorch_lightning tests -v --color=yes --durations=0 --junitxml=junit/test-results-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.requires }}.xml
|
||||
# coverage report
|
||||
shell: bash -l {0}
|
||||
|
||||
|
|
|
@ -119,7 +119,7 @@ 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 pl_examples -v --durations=0 --junitxml=junit/test-results-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.requires }}.xml
|
||||
coverage run --source pytorch_lightning -m pytest pytorch_lightning tests pl_examples -v --color=yes --durations=0 --junitxml=junit/test-results-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.requires }}.xml
|
||||
|
||||
- name: Upload pytest test results
|
||||
uses: actions/upload-artifact@master
|
||||
|
|
|
@ -21,7 +21,7 @@ local tputests = base.BaseTest {
|
|||
command: utils.scriptCommand(
|
||||
|||
|
||||
cd pytorch-lightning
|
||||
coverage run --source=pytorch_lightning -m pytest tests/models/test_tpu.py -v
|
||||
coverage run --source=pytorch_lightning -m pytest tests/models/test_tpu.py -v --color=yes
|
||||
test_exit_code=$?
|
||||
echo "\n||| END PYTEST LOGS |||\n"
|
||||
coverage xml
|
||||
|
|
Loading…
Reference in New Issue