Skip to content

Commit 7f1eab4

Browse files
authored
try adding coverage (Lightning-AI#2441)
* add coverage, test failing * fix test * badges * typo * freeze conda
1 parent 695e051 commit 7f1eab4

File tree

3 files changed

+7
-26
lines changed

3 files changed

+7
-26
lines changed

.github/workflows/ci-testing.yml

Lines changed: 5 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -115,14 +115,9 @@ jobs:
115115
key: pl-dataset
116116

117117
- name: Tests
118-
# env:
119-
# TOXENV: py${{ matrix.python-version }}
120118
run: |
121-
# tox --sitepackages
122-
# flake8 .
123-
# NOTE: run coverage on tests does not propagare faler status for Win, https://github.com/nedbat/coveragepy/issues/1003
124-
python -m pytest pytorch_lightning tests -v --junitxml=junit/test-results-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.requires }}.xml
125-
# coverage report
119+
# NOTE: do not include coverage report here, see: https://github.com/nedbat/coveragepy/issues/1003
120+
coverage run --source pytorch_lightning -m pytest pytorch_lightning tests -v --junitxml=junit/test-results-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.requires }}.xml
126121
127122
- name: Upload pytest test results
128123
uses: actions/upload-artifact@master
@@ -132,21 +127,7 @@ jobs:
132127
# Use always() to always run this step to publish test results when there are test failures
133128
if: always()
134129

135-
- name: Package Setup
130+
- name: Statistics
131+
if: success()
136132
run: |
137-
check-manifest
138-
python setup.py check --metadata --strict
139-
python setup.py sdist
140-
twine check dist/*
141-
142-
#- name: Try install package
143-
# if: ! startsWith(matrix.os, 'windows')
144-
# run: |
145-
# virtualenv vEnv ; source vEnv/bin/activate
146-
# pip install --editable . ; cd .. & python -c "import pytorch_lightning ; print(pytorch_lightning.__version__)"
147-
# deactivate ; rm -rf vEnv
148-
149-
#- name: Statistics
150-
# if: success()
151-
# run: |
152-
# coverage report
133+
coverage report

.github/workflows/pt-conda.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252
with:
5353
# auto-update-conda: true
5454
auto-activate-base: false
55-
miniconda-version: 'latest'
55+
miniconda-version: 4.7.12
5656
python-version: ${{ matrix.python-version }}
5757
environment-file: environment.yml
5858
activate-environment: pl-env

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040

4141
| System / PyTorch ver. | 1.3 (min. req.) | 1.4 | 1.5 (latest) |
4242
| :---: | :---: | :---: | :---: |
43-
| Conda py3.7 [linux] | ![PyTorch & Conda](https://github.com/PyTorchLightning/pytorch-lightning/workflows/PyTorch%20&%20Conda%20compatibility/badge.svg) | ![PyTorch & Conda](https://github.com/PyTorchLightning/pytorch-lightning/workflows/PyTorch%20&%20Conda%20compatibility/badge.svg) | ![PyTorch & Conda](https://github.com/PyTorchLightning/pytorch-lightning/workflows/PyTorch%20&%20Conda%20compatibility/badge.svg) |
43+
| Conda py3.7 [linux] | ![PyTorch & Conda](https://github.com/PyTorchLightning/pytorch-lightning/workflows/PyTorch%20&%20Conda/badge.svg) | ![PyTorch & Conda](https://github.com/PyTorchLightning/pytorch-lightning/workflows/PyTorch%20&%20Conda/badge.svg) | ![PyTorch & Conda](https://github.com/PyTorchLightning/pytorch-lightning/workflows/PyTorch%20&%20Conda/badge.svg) |
4444
| Linux py3.7 [GPU] | - | - | [![Build Status](http://35.192.60.23/api/badges/PyTorchLightning/pytorch-lightning/status.svg)](http://35.192.60.23/PyTorchLightning/pytorch-lightning) |
4545
| Linux py3.6 / py3.7 / py3.8 | [![CI testing](https://github.com/PyTorchLightning/pytorch-lightning/workflows/CI%20testing/badge.svg?event=push)](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22CI+testing%22) | - | [![CI testing](https://github.com/PyTorchLightning/pytorch-lightning/workflows/CI%20testing/badge.svg?event=push)](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22CI+testing%22) |
4646
| OSX py3.6 / py3.7 | - | [![CI testing](https://github.com/PyTorchLightning/pytorch-lightning/workflows/CI%20testing/badge.svg?event=push)](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22CI+testing%22) | [![CI testing](https://github.com/PyTorchLightning/pytorch-lightning/workflows/CI%20testing/badge.svg?event=push)](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22CI+testing%22) |

0 commit comments

Comments
 (0)