name: PyTorch & Conda # see: https://help.github.com/en/actions/reference/events-that-trigger-workflows on: # Trigger the workflow on push or pull request, but only for the master branch push: branches: [master] pull_request: branches: [master] jobs: conda: runs-on: ${{ matrix.os }} container: pytorchlightning/pytorch_lightning:base-cuda-py${{ matrix.python-version }}-torch${{ matrix.pytorch-version }} strategy: fail-fast: false matrix: os: [ubuntu-20.04] python-version: [3.7] pytorch-version: [1.3, 1.4, 1.5, 1.6, 1.7] # Timeout: https://stackoverflow.com/a/59076067/4521646 timeout-minutes: 35 steps: - uses: actions/checkout@v2 - name: Update dependencies run: | conda info conda list pip install --requirement requirements/devel.txt --upgrade-strategy only-if-needed pip list - name: Cache datasets # todo this probably does not work with docker images, rather cache dockers uses: actions/cache@v2 with: path: Datasets # This path is specific to Ubuntu # Look to see if there is a cache hit for the corresponding requirements file key: pl-dataset - 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 --color=yes --durations=0 --junitxml=junit/test-results-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.requires }}.xml # coverage report shell: bash -l {0} - name: Upload pytest test results uses: actions/upload-artifact@master with: name: pytest-results-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.requires }} path: junit/test-results-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.requires }}.xml # Use always() to always run this step to publish test results when there are test failures if: always()