From 0c285cd76f5f547ee1228e15e653c0b7d2dc488d Mon Sep 17 00:00:00 2001 From: "J. Borovec" Date: Sun, 26 Apr 2020 23:47:59 +0200 Subject: [PATCH] refactor --- .github/workflows/ci-testing.yml | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci-testing.yml b/.github/workflows/ci-testing.yml index 5b91ebe4..baa6f50d 100644 --- a/.github/workflows/ci-testing.yml +++ b/.github/workflows/ci-testing.yml @@ -42,20 +42,24 @@ jobs: run: | brew install libomp # https://github.com/pytorch/pytorch/issues/20030 brew install openmpi # Horovod on macOS requires OpenMPI, Gloo not currently supported + - name: Setup Windows if: runner.os == 'windows' run: | python -c "lines = [line for line in open('requirements-extra.txt').readlines() if not line.startswith('horovod')] ; open('requirements-extra.txt', 'w').writelines(lines)" + # TODO: remove after https://github.com/pytorch/pytorch/issues/32186 is resolved - name: Setup Windows on Latest if: runner.os == 'windows' && matrix.requires == 'latest' run: | python -c "req = open('requirements.txt').read().replace('torch>=1.1', 'torch<1.5') ; open('requirements.txt', 'w').write(req)" + - name: Set min. dependencies if: matrix.requires == 'minimal' run: | python -c "req = open('requirements.txt').read().replace('>', '=') ; open('requirements.txt', 'w').write(req)" python -c "req = open('requirements-extra.txt').read().replace('>', '=') ; open('requirements-extra.txt', 'w').write(req)" + - name: Cache pip uses: actions/cache@v1 with: @@ -65,12 +69,6 @@ jobs: restore-keys: | ${{ runner.os }}-pip-${{ matrix.python-version }}- ${{ runner.os }}-${{ matrix.python-version }}- - - name: Cache datasets - uses: actions/cache@v1 - with: - path: tests/Datasets # This path is specific to Ubuntu - # Look to see if there is a cache hit for the corresponding requirements file - key: mnist-dataset - name: Install dependencies run: | @@ -83,6 +81,13 @@ jobs: pip list shell: bash + - name: Cache datasets + uses: actions/cache@v1 + with: + path: tests/Datasets # This path is specific to Ubuntu + # Look to see if there is a cache hit for the corresponding requirements file + key: mnist-dataset + - name: Tests # env: # TOXENV: py${{ matrix.python-version }} @@ -91,6 +96,7 @@ jobs: # flake8 . coverage run --source pytorch_lightning -m py.test pytorch_lightning tests -v --doctest-modules --junitxml=junit/test-results-${{ runner.os }}-${{ matrix.python-version }}.xml coverage report + - name: Upload pytest test results uses: actions/upload-artifact@master with: