name: stable-torch

on:
  pull_request:
  push:
    branches:
      - master
  schedule:
    - cron: '0 0 * * *'

jobs:
  stable-torch:

    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
      matrix:
        python-version: [3.7]

    steps:
    - uses: actions/checkout@v1
    - name: Set up Python ${{ matrix.python-version }}
      uses: actions/setup-python@v1
      with:
        python-version: ${{ matrix.python-version }}
    - name: Fetch submodules
      run: git submodule update --init
    - name: Install dependencies
      run: ci/install_dependencies.sh
    - name: Install TorchANI
      run: python setup.py install
    - name: Download data files
      run: ./download.sh
    - name: Run tests
      run: pytest
