lightning/.github/workflows/ci_test-conda.yml

60 lines
2.1 KiB
YAML
Raw Normal View History

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, "release/*" ]
pull_request:
branches: [master, "release/*"]
jobs:
conda:
runs-on: ubuntu-20.04
container: pytorchlightning/pytorch_lightning:base-conda-py${{ matrix.python-version }}-torch${{ matrix.pytorch-version }}
strategy:
fail-fast: false
matrix:
# os: [ubuntu-20.04]
python-version: [3.7]
pytorch-version: [1.4, 1.5, 1.6, 1.7, 1.8]
# 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: Pull checkpoints from S3
# todo: consider adding coma caching, but ATM all models have less then 100KB
run: |
# enter legacy and update checkpoints from S3
cd legacy
curl https://pl-public-data.s3.amazonaws.com/legacy/checkpoints.zip --output checkpoints.zip
unzip -o checkpoints.zip
ls -l checkpoints/
# todo: require proper fix in docker image
- name: Hotfix dependency
run: |
pip install torchtext==0.6.0 -U
shell: bash
- 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 --durations=50 --junitxml=junit/test-results-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.requires }}.xml
shell: bash -l {0}
- name: Upload pytest test 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
if: failure()