parent
947d1cb757
commit
0c6c078bb4
|
@ -18,11 +18,17 @@ jobs:
|
|||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-18.04, windows-2019, macOS-10.15]
|
||||
python-version: [3.6, 3.7, 3.8, 3.9]
|
||||
python-version: [3.6, 3.8, 3.9]
|
||||
requires: ['minimal', 'latest']
|
||||
release: ['stable']
|
||||
exclude:
|
||||
- python-version: 3.9
|
||||
requires: 'minimal'
|
||||
include:
|
||||
- os: ubuntu-20.04
|
||||
python-version: 3.9
|
||||
requires: 'latest'
|
||||
release: 'pre'
|
||||
|
||||
# Timeout: https://stackoverflow.com/a/59076067/4521646
|
||||
# TODO: the macOS is taking too long, probably caching did not work...
|
||||
|
@ -96,9 +102,9 @@ jobs:
|
|||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ${{ steps.pip-cache.outputs.dir }}
|
||||
key: ${{ runner.os }}-pip-py${{ matrix.python-version }}-${{ matrix.requires }}-${{ hashFiles('requirements.txt') }}-${{ hashFiles('requirements/extra.txt') }}
|
||||
key: ${{ runner.os }}-pip-py${{ matrix.python-version }}-${{ matrix.release }}-${{ matrix.requires }}-${{ hashFiles('requirements.txt') }}-${{ hashFiles('requirements/extra.txt') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pip-py${{ matrix.python-version }}-${{ matrix.requires }}-
|
||||
${{ runner.os }}-pip-py${{ matrix.python-version }}-${{ matrix.release }}-${{ matrix.requires }}-
|
||||
|
||||
- name: Pull checkpoints from S3
|
||||
run: |
|
||||
|
@ -126,7 +132,8 @@ jobs:
|
|||
python --version
|
||||
pip --version
|
||||
# python -m pip install --upgrade --user pip
|
||||
pip install --requirement requirements.txt --find-links https://download.pytorch.org/whl/cpu/torch_stable.html --upgrade
|
||||
flag=$(python -c "print('--pre' if '${{matrix.release}}' == 'pre' else '')" 2>&1)
|
||||
pip install --requirement requirements.txt --find-links https://download.pytorch.org/whl/cpu/torch_stable.html --upgrade $flag
|
||||
# adjust versions according installed Torch version
|
||||
python ./requirements/adjust_versions.py requirements/extra.txt
|
||||
python ./requirements/adjust_versions.py requirements/examples.txt
|
||||
|
@ -158,7 +165,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 -v --durations=50 --junitxml=junit/test-results-${{ runner.os }}-py${{ matrix.python-version }}-${{ matrix.requires }}.xml
|
||||
coverage run --source pytorch_lightning -m pytest pytorch_lightning tests -v --durations=50 --junitxml=junit/test-results-${{ runner.os }}-py${{ matrix.python-version }}-${{ matrix.requires }}-${{ matrix.release }}.xml
|
||||
|
||||
- name: Examples
|
||||
run: |
|
||||
|
@ -167,8 +174,8 @@ jobs:
|
|||
- 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
|
||||
name: pytest-results-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.requires }}-${{ matrix.release }}
|
||||
path: junit/test-results-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.requires }}-${{ matrix.release }}.xml
|
||||
if: failure()
|
||||
|
||||
- name: Statistics
|
||||
|
|
Loading…
Reference in New Issue