Skip to content

Commit 0c6c078

Browse files
authored
CI for pre-release (#7220)
* ci for pre-release * . * drop 3.7
1 parent 947d1cb commit 0c6c078

File tree

1 file changed

+14
-7
lines changed

1 file changed

+14
-7
lines changed

.github/workflows/ci_test-full.yml

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,17 @@ jobs:
1818
fail-fast: false
1919
matrix:
2020
os: [ubuntu-18.04, windows-2019, macOS-10.15]
21-
python-version: [3.6, 3.7, 3.8, 3.9]
21+
python-version: [3.6, 3.8, 3.9]
2222
requires: ['minimal', 'latest']
23+
release: ['stable']
2324
exclude:
2425
- python-version: 3.9
2526
requires: 'minimal'
27+
include:
28+
- os: ubuntu-20.04
29+
python-version: 3.9
30+
requires: 'latest'
31+
release: 'pre'
2632

2733
# Timeout: https://stackoverflow.com/a/59076067/4521646
2834
# TODO: the macOS is taking too long, probably caching did not work...
@@ -96,9 +102,9 @@ jobs:
96102
uses: actions/cache@v2
97103
with:
98104
path: ${{ steps.pip-cache.outputs.dir }}
99-
key: ${{ runner.os }}-pip-py${{ matrix.python-version }}-${{ matrix.requires }}-${{ hashFiles('requirements.txt') }}-${{ hashFiles('requirements/extra.txt') }}
105+
key: ${{ runner.os }}-pip-py${{ matrix.python-version }}-${{ matrix.release }}-${{ matrix.requires }}-${{ hashFiles('requirements.txt') }}-${{ hashFiles('requirements/extra.txt') }}
100106
restore-keys: |
101-
${{ runner.os }}-pip-py${{ matrix.python-version }}-${{ matrix.requires }}-
107+
${{ runner.os }}-pip-py${{ matrix.python-version }}-${{ matrix.release }}-${{ matrix.requires }}-
102108
103109
- name: Pull checkpoints from S3
104110
run: |
@@ -126,7 +132,8 @@ jobs:
126132
python --version
127133
pip --version
128134
# python -m pip install --upgrade --user pip
129-
pip install --requirement requirements.txt --find-links https://download.pytorch.org/whl/cpu/torch_stable.html --upgrade
135+
flag=$(python -c "print('--pre' if '${{matrix.release}}' == 'pre' else '')" 2>&1)
136+
pip install --requirement requirements.txt --find-links https://download.pytorch.org/whl/cpu/torch_stable.html --upgrade $flag
130137
# adjust versions according installed Torch version
131138
python ./requirements/adjust_versions.py requirements/extra.txt
132139
python ./requirements/adjust_versions.py requirements/examples.txt
@@ -158,7 +165,7 @@ jobs:
158165
- name: Tests
159166
run: |
160167
# NOTE: do not include coverage report here, see: https://github.com/nedbat/coveragepy/issues/1003
161-
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
168+
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
162169
163170
- name: Examples
164171
run: |
@@ -167,8 +174,8 @@ jobs:
167174
- name: Upload pytest results
168175
uses: actions/upload-artifact@v2
169176
with:
170-
name: pytest-results-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.requires }}
171-
path: junit/test-results-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.requires }}.xml
177+
name: pytest-results-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.requires }}-${{ matrix.release }}
178+
path: junit/test-results-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.requires }}-${{ matrix.release }}.xml
172179
if: failure()
173180

174181
- name: Statistics

0 commit comments

Comments
 (0)